home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-03-19 | 311.0 KB | 7,899 lines | [TEXT/MPS ] |
-
-
- ##############################################################
- ##############################################################
- SPEC Libraries Cross Reference.
- Goal: to provide a comprehensive file of all SPEC tasks, with
- cross-referencing to allow faster tracing of code.
-
- Conventions:
- For each task, the actual task name and parameters are listed,
- followed by the library, and the task header.
- After the header is a list of library tasks called by this task,
- followed by a list of tasks that call this task.
-
- Standard tasks in a list include the parentheses [task()].
- Task references or hooks in the list do NOT include parentheses
- [TaskReference or gTaskHook].
- For tasks called from more than 12 other tasks, the is called by
- list will include just the libraries that reference this task.
- Built-in tasks and VU commands are NOT listed.
-
- Jay Loucks 9602.14
- ##############################################################
- ##############################################################
-
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: CrashHandling.lib
- Calls: "Results Express.lib","FileToolOperations.lib","TCS.lib",
- "ExceptionHandling.Lib","Output.Lib",
- "String.Lib", "MemoryMonitorOperations.Lib";
-
- Task: GatherTargetCrashLog( pErrorCode, pAbortSuite := 1, pAppleScriptMethod := 1 )
- Library: CrashHandling.lib
- Header:
- #########################################################################
- # GatherTargetCrashLog( pErrorCode, pAbortSuite, pAppleScriptMethod )
- #========================================================================
- # Author: KTA
- # Description: 1) Initializes filetool on the target.
- # 2) checks to see if a file named "CRASHLOG" exists on the root
- # of boot vol.
- # 3) Moves a copy of the macsbug data to 'CrashLogs ƒ' on the root.
- # 4) Reads the file using FileTool
- # 5) Writes a testcase that includes the data using ResultsExpress.
- # 6) Deletes the working copy of the file
- # Note: Step 4 and 5 may be controlled with either AppleScript
- # or VU. AppleScript is the preferred method as VU has a
- # 2000 character string limit. If the AppleScript method fails,
- # we try again using VU.
- #
- # Parameters: pErrorCode - The error code that VU recieved when it 1st detected
- # the crash.
- # pAbortSuite - a Flag to indicate whether we wish to abort
- # the current suite because of the crash.
- # pAppleScriptMethod - a flag used to indicate whether to use
- # AppleScript or not (for initiating steps 3 and 4 only).
- # Returns: Nothing
- # Examples: GatherTargetCrashLog( -1100, 1)
- # Assumptions:
- #########################################################################
- Calls: _FileTool( "initialize"), _FileTool( "FileExists"), GetRenameCrashLogAs(), _FileTool( "Rename"),
- logstr(),GatherWithAppleScript(), DeleteTheFile(), QuitFileTool(), CleanAbort(),
- TCSStart(), TCSEnd(),
- Is called by: DefaultCrashHandler()
-
-
- Task: GatherWithAppleScript( pErrorCode, pTCSpecifier)
- Library: CrashHandling.lib
- Header:
- #########################################################################
- # GatherWithAppleScript( pErrorCode, pTCSpecifier )
- #========================================================================
- # Author: KTA
- # Description: Steps 4 and 5 of GatherTargetCrashLog() using AppleScript
- # 1) …
- # 2) …
- # 3) …
- # 4) Reads the file using FileTool
- # 5) Writes a testcase that includes the data using ResultsExpress.
- #
- # Parameters: pErrorCode - The error code that VU recieved when it 1st detected
- # the crash.
- # pTCSpecifier - The data used to identify the testcase if the form:
- # {Number,"Set","Type","Owner","Description", Result}
- # Returns: true - succesful
- # false - an error occured
- # Examples: GatherWithAppleScript( -1100 , {2,"Set","Type","Owner","Description", -3});
- #
- # Assumptions:
- #########################################################################
- Calls: AppleScriptString()
- Is called by: GatherTargetCrashLog()
-
-
- Task: DefaultCrashHandler(pErrID, pParamList := {1,1,1})
- Library: CrashHandling.lib
- Header:
- #########################################################################
- # DefaultCrashHandler(pParamList)
- #========================================================================
- # Description: simple Crash handler prototype
- # Parameters: pParamList: list of parameters
- # element 1 := What to do about the suite(1 - Fail the suite/0 don't fail the suite)
- # element 2 := What to do if can't aquire target (1 - abort script/0-suspend)
- # element 3 := What to do if can't gather crashlog (1 - abort script/0-turn off crashHandler but continue)
- # element 4 := [optional] Throw when done or not - will throw whatever it is defined as
- # Returns: result of error handler TASK call, or throw if fatal
- # Examples: DefaultCrashHandler({1})
- # Assumptions: VU 2.1
- #========================================================================
- Calls: LogStr(), _matchBoolean(), ReacquireTarget(), TCSStart(), TCSEnd(),
- gConfirmReacquireTargetHook, ClearStack(), InstallEveryTimeMacro()
- Is called by: InitGlobals(), CheckforSystemFailure()
-
-
- Task: ReacquireTarget(pTargetName := global gMachineName, pZoneName := "*")
- Library: CrashHandling.lib
- Header:
- #########################################################################
- # ReacquireTarget()
- #========================================================================
- # Author: KTA
- # Description:
- # Parameters: None
- # Returns: Nothing
- # Examples:
- # Assumptions:
- #########################################################################
- Calls: CommandTimeOut(), acquireTarget(), _matchBoolean(), LogStr()
- Is called by: DefaultCrashHandler(),
-
-
- Task: InstallEveryTimeMacro(pMacroCommands := global gMacroCommands)
- Library: CrashHandling.lib
- Header:
- #########################################################################
- # InstallEveryTimeMacro()
- #========================================================================
- # Description: Sends a Debug sting that invokes the everytime macro and
- # restarts the target if there was a crash.
- # Parameters: pMacroCommands - commands to be included in the everytime
- # macro which will execute when the target crashes.
- # Returns: nothing
- # Examples: InstallEveryTimeMacro('HOW; WH; TD; HT; SC;');
- # Assumptions: VU 2.1
- #========================================================================
- Calls: PathToSpecialFolder(), DoesFileExist(), _FileTool(), QuitFileTool(), MemoryMonitorInit(), _MemoryMonitor(), LogStr(), _DebugStr(),
- Is called by: DefaultCrashHandler(), SuiteStart()
-
-
- Task: GetRenameCrashLogAs()
- Library: CrashHandling.lib
- Header:
- #########################################################################
- # GetRenameCrashLogAs()
- #========================================================================
- # Author: ML
- # Description: Accesser for getting the name that the crash log will
- # be renamed as.
- # Parameters: none
- # Returns: gRenameCrashLogAs
- # Examples: GetRenameCrashLogAs();
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: GatherTargetCrashLog(),
-
-
- Task: SetRenameCrashLogAs(pName)
- Library: CrashHandling.lib
- Header:
- #########################################################################
- # SetRenameCrashLogAs(pName)
- #========================================================================
- # Author: ML
- # Description: Accesser for setting the name that the crash log will
- # be renamed as.
- # Parameters: none
- # Returns: none
- # Examples: SetRenameCrashLogAs("my custom log name")
- # Assumptions: None
- #========================================================================
- # History:
- # 5/16/95 ML created
- #########################################################################
- Calls:
- Is called by:
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: Custom.Lib
- Calls: {user defined}
-
-
- Task: InitCustom()
- Library: Custom.Lib
- Header:
- #########################################################################
- # InitCustom()
- #========================================================================
- # Author: KTA
- # Description: This has been provided as a mechanism for scriptwriters to
- # customize the SPEC S&L Libraries. If the default value of
- # and global variables is not what is desired, this is the
- # task where the script writer should reset any global values.
- # This task is called from InitGloabls() immediately after all
- # global variables have been defined.
- # Please refer to 'The Hitchhikers Guide' for more information
- # concerning any individual global variables.
- # Parameters: None
- # Returns: Nothing
- # Examples: InitCustom();
- # Assumptions:
- #########################################################################
- Calls: {user defined}
- Is called by: InitGloabls()
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: DA.Lib
- Calls: "Output.Lib","TCS.Lib","LaunchQuit.Lib","TargetCheck.Lib",
- "UserInterface.Lib", "ExceptionHandling.Lib"
-
-
-
- Task: Scrapbook(requestElement,ccpFlag := 1,pasteFlag := 1)
- Library: DA.Lib
- Header:
- #########################################################################
- # Scrapbook(requestElement,ccpFlag,pasteFlag)
- #========================================================================
- # Author: KTA
- # Description: This routine will select the scrapbook, scroll to the
- # designated requestElement position, select Cut, Copy, Paste,
- # or Clear from the Edit menu, close the scrapbook if under System
- # 6.0.x, and then select Paste if the pasteFlag parameter is 1.
- # Parameters: requestElement - the element in the scrapbook to scroll to
- # ccpFlag - 1 for copy
- # 2 for cut
- # 3 for paste
- # 4 for clear
- # pasteFlag - 1 to paste after closing Scrapbook
- # 0 not to paste after closing Scrapbook
- # Returns: 0 - Couldn't complete operation
- # element - Scrapbook element that operation took place on
- # Examples: Scrapbook(2) will scroll the horizontal bar to the
- # second entry and then copy, close and paste.
- # Assumptions: That the scrollbars are present. That the string
- # 'Scrapbook' appear somewhere in the name
- #========================================================================
- Calls: LogStr(), TCSStart(), TCSEnd(), MatchApplication(), LaunchTwitch(),
- _match (), _scroll (), ExceptionDispatcher(), SelectMenuItem(), keyEq(),
- closeWindow(),
- Is called by: DoSetUpApp()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: DoTasks.Lib
- Calls: "OutPut.Lib","Font.Lib","StandardFile.Lib","TCS.Lib","Draw.Lib",
- "Print.Lib","LaunchQuit.Lib","Misc.Lib","TargetCheck.Lib", "DA.Lib",
- "UserInterface.Lib", "ExceptionHandling.Lib"
-
-
- Task: DoDraw(pTestMethod := -1, pSpecifier := 0, pNumTimes := 1 )
- Library: DoTasks.Lib
- Header:
- #########################################################################
- # DoDraw( pTestMethod, pSpecifier, pNumTimes )
- #========================================================================
- # Author: KTA
- # Description: This task is a high level task which controls the amount and
- # type of draw testing which will be automatically performed (based upon
- # predefined application specific data structures).
- # Parameters: pTestMethod - the method of testing desired.
- # 1 - random object will be generated <pNumtimes> times.
- # 2 - a random object will be generated for all tools
- # defined in the gToolList.
- # pSpecifier - (String, integer, descriptor) window pSpecifier in
- # which drawing will occur.
- # pNumTimes - (integer) number of times to perform the <pTestMethod>.
- # Task references : A number of global undefined task references have been provided
- # to allow scriptwriters the ability to customize calls to DoDraw();
- # gDoDrawHook1 - prior to any drawing.
- # gDoDrawHook2 - after drawing each individual object
- # gDoDrawHook3 - after completion of drawing all objects
- # Returns: Nothing
- # Examples: DoDraw(1,1,1)
- # Assumptions: Data Structures are set up correctly (see the HitchHiker's guide for details)
- # Notes: If the pTestMethod parameter is not explicitly passed in it
- # can be set by defining the global gDrawLevel. gDrawLevel can
- # be an integer or a list. If gDrawLevel is an integer it will be
- # used as the pTestMethod input parameter. If gDrawLevel is a list
- # the 1st element is the pTestMethod, the 2nd is the pNumTimes parameter.
- #========================================================================
- Calls: gDoDrawHook1, RandomDrawObject(), DrawObject(), gDoDrawHook2, gDoDrawHook3
- Is called by: DoWPTools()
-
-
- Task: DoWindow(pTestMethod := -1, pSpecifier := 0, pRestoreWindow := 0, pNumTimes := 1 )
- Library: DoTasks.Lib
- Header:
- #########################################################################
- # DoWindow( pTestMethod, pSpecifier, pRestoreWindow, pNumTimes )
- #========================================================================
- # Author: KTA
- # Description: This task is a high level task which controls the amount and
- # type of window testing which will be automatically performed.
- # Parameters: pTestMethod - the method of testing desired.
- # 1 - a less complete window test (functionlist build
- # dynamically based on gDoWindowList see below)
- # 2 - complete window test scrolling, sizing, dragging, zooming.
- # pSpecifier - (String, integer, descriptor) window pSpecifier for
- # to be exercised.
- # pRestoreWindow - Boolean - indicates whether or not to restore
- # the window to it's original condition.
- # pNumTimes - (integer) number of times to perform the <pTestMethod>.
- # Returns: Nothing
- # Examples: DoWindow(1,0,0,2)
- # Assumptions:
- # Notes: For more info in what each test does see TestWindow() in
- # 'UserInterface.lib'.
- # If the pTestMethod parameter is not explicitly passed in it
- # can be set by defining the global gWindowLevel. gWindowLevel can
- # be an integer or a list. If gWindowLevel is an integer it will be
- # used as the pTestMethod input parameter. If gWindowLevel is a list
- # the 1st element is the pTestMethod, the 2nd is the pNumTimes parameter.
- #
- # A global, gDoWindowList, has been provided as a way to indicate
- # which tests are available for a given application.
- # NOTE: This is only valid if pTestWindow evaluates to 2.
- # e.g. global gDoWindowList := {1,1,1,1};
- # Set each element to 1 or 0.
- # Flag for performing DoWindows tests as follows:
- # Element: 1 - Sizing
- # 2 - Scrolling
- # 3 - Dragging
- # 4 - Zooming
- #
- #========================================================================
- Calls: gSetupDoWindow, TestWindow(), gDoWindowTailPatch
- Is called by:
-
-
-
- Task: DoText(pTestMethod := -1, pNumTimes := 1)
- Library: DoTasks.Lib
- Header:
- #########################################################################
- # DoText(pTestMethod, pNumTimes)
- #========================================================================
- # Author: KTA
- # Description: This task is a high level task which controls the amount and
- # type of font testing which will be automatically performed.
- # Parameters: pTestMethod - the method of testing desired.
- # 1 - Random font test
- # 2 - QuickLook font test
- # 3 - WaterFall font test
- # pNumTimes - (integer) number of times to perform the <pTestMethod>.
- # (not valid for WaterFall testing)
- # Returns: nada
- # Examples: DoText(2,3);
- # Assumptions: global gFontList, gFontSizeList, gFontStyleList must be defined.
- # Notes: If the pTestMethod parameter is not explicitly passed in it
- # can be set by defining the global gFontLevel. gFontLevel can
- # be an integer or a list. If gFontLevel is an integer it will be
- # used as the pTestMethod input parameter. If gFontLevel is a list
- # the 1st element is the pTestMethod, the 2nd is the pNumTimes parameter.
- #========================================================================
- Calls: InitFonts(), gSetupDoText, RandomFontRecords(), SetFontParams(), TypeStr(),
- ReportSelectedMenuItems(), WaterFallFontTest(), gClearDoText
- Is called by:
-
-
- Task: DoFiles(pTestMethod := -1,pFileName := "",pSaveAsFlag := 1, pSelectOpen := 2, pRevertMI := '')
- Library: DoTasks.Lib
- Header:
- #########################################################################
- # DoFiles(pTestMethod, pFileName, pSaveAsFlag, pSelectOpen, pRevertMI )
- #========================================================================
- # Author: KTA
- # Description: This task is a high level task which controls the amount and
- # type of file testing which will be automatically performed.
- # Parameters: pTestMethod - Method of testing
- # 1 - All tests outlined below
- # 2 - Save As/Replace, close, open.
- # 3 - Save As/Cancel, Save, modify, revert.
- # 4 - Save/Cancel,Save(unique), Save (same file name)/Replace,
- # Save (same file name)/create unique extension.
- # 5 - Save As/Cancel, Save
- # pFileName - File name to use when saving file if none passed
- # a filename will be generated bassed on the
- # applications name and the time.
- # pSaveAsFlag - Valid for all Testmethods. Indicates whether
- # selecting the Save As menuItem is necessary.
- # 1 - select Save As. HardCoded 'Save As'.
- # 0 - Do not select SaveAs.
- # list - list containing ordinality of 'Save As' menuItem.
- # This parameter has been updated for international support.
- # Now it can also be a list which contains the ordinality of
- # the Save As menuItem. If a it is a list then the Save As menuItem
- # will be selected using the contents of the list.
- # e.g. if pSaveAsFlag = {6,2}, the sixth menuitem from the 2nd menu will
- # be selected as the Save As menuItem.
- # pSelectOpen - Only valid if <pTestMethod> evaluates to 2
- # 0 - Don't select 'Open' or anything else
- # 1 - Select 'Open' - hard coded
- # 2 - Select 'Open' by way of keyboard equivelant 'o'.
- # list - list containing ordinality of 'Open' menuItem.
- # pRevertMI - Only valid if <pTestMethod> evaluates to 3
- # '' - Hard coded 'Revert' menuItem will be selected
- # list - list containing ordinality of revert MenuItem
- # Returns: nada
- # Examples: DoFiles(2, "myFile", {6,2}, {4,2}); # Save, close, open.
- # Assumptions:
- #========================================================================
- Calls: DoFiles(), SaveAs(), CloseWindow(), OpenFile(), CancelStandardFile(),
- Save(), ModifyDocument(), Revert(),
- Is called by: DoSetUpApp(), DoCloseApp(), Do Files()
-
-
- Task: TASK DoSetUpApp(pDismissOpeningDialog:=0, pDefaultWindowSpec:=0,
- pNewDocPath:={'New','File'}, pDismissNewDocDialog:=0,pScrapText:=0,
- pScrapPict:=0, pSaveDoc:=1, pOpenDoc := 2)
- Library: DoTasks.Lib
- Header:
- #########################################################################
- # DoSetUpApp(pDismissOpeningDialog, pDefaultWindowSpec, pNewDocPath,
- # pDismissNewDocDialog,pScrapText, pScrapPict, pSaveDoc, pOpenDoc)
- #=======================================================================
- # Author: ML
- #
- # Description: Sets up app after launch. Matches app, closes default
- # window, creates a new document, optionally pastes from scrap,
- # saves document.
- #
- # Parameters: pDismissOpeningDialog - 0 No opening dialog
- # 1 type return key
- # 'string' select button named {string}
- # pDefaultWindowSpec - if -1, no default window - don't close
- # if 0, close first document window
- # if string, then it holds title of window
- # if integer > 0, then it holds ordinality of window
- # Descriptor - window descriptor
- # pNewDocPath - 0 don't create new doc
- # {list} - containing ordinality of 'New' menuItem
- #
- # pDismissNewDocDialog - 0 No new doc dialog
- # 1 type return key
- # 'string' select button named {string}
- # pScrapText - 0 Don't call Scrapbook(global ScrapText)
- # 1 call Scrapbook(global ScrapText)
- # pScrapPict - 0 Don't call Scrapbook(global ScrapPict)
- # 1 call Scrapbook(global ScrapPict)
- # pSaveDoc - 0 Don't save newly created doc via DoFiles(2)
- # 1 Save newly created doc via DoFiles(2)
- # {list} - containing ordinality of Save As menuItem
- # pOpenDoc - 0 Don't save select 'Open' menuitem
- # 1 Select 'open' menuItem - hardcoded
- # 2 - keyEq('o');
- # {list} - containing ordinality of 'Open' menuItem
- #
- # Task references : A number of global undefined task references have been provided
- # to allow scriptwriters the ability to customize calls to DoSetUpApp();
- # gCustomScrapText - instead of generic Scrapbook(kScrapTEXT)
- # gCustomScrapPict - instead of generic Scrapbook(kScrapPICT)
- # gSetUpForSaveDoc - To do any setup before calling DoFiles(2)
- # Returns: None
- #
- # Example: DoSetUpApp(0,1,{'New','File'},0,0,0,1)
- #=======================================================================
- Calls: gDoSetUpAppHook1, LogStr(), MatchApplication(), findWindow(), TCSStart(),
- TCSEnd(), gDoSetUpAppHook2, ProfileApplication(), _matchBoolean (), CloseWindow(),
- gScriptBeginCriticalHook, gCustomScrapText, Scrapbook(), gScriptEndCriticalHook,
- gSetUpForSaveDoc, DoFiles(),
- Is called by:
-
-
- Task: DoCloseApp(pSaveRevert := 0, pDismissAboutBox := 0,
- pPageSetup := 1, pPrinter := 1, pQuit := 1)
- Library: DoTasks.Lib
- Header:
- #########################################################################
- # DoCloseApp(pSaveRevert, pDismissAboutBox, pPageSetup, pPrinter, pQuit)
- #=======================================================================
- # Author: ML
- # Description: Performs either DoFiles(3) or Dofiles(5), Selects and dismisses
- # the 'About' box, Selects and dismisses 'Page Setup', Selects and
- # dismisses 'Print', thenpQuits.
- # Parameters: pSaveRevert - 0 - Save As/Cancel/Save, no modify/revert
- # 1 - Save As/Cancel/Save, modify/revert
- # -1 - no Save As/Cancel/Save, no modify/revert
- # {list} - International - two elements
- # 1st element
- # list - list containing ordinality of 'Revert' menuItem.
- # integer - Any of the pSaveRevert options listed above.
- # 2nd Element - should be set even if 1st element is 0
- # list - list containing ordinality of 'Save As' menuItem.
- # pDismissAboutBox - -1 - Don't do About Box test
- # 0 - Return key
- # integer > 0 - Click in center of
- # screen {integer} times
- # String - Select button named <string>
- # pPageSetup -
- # 0 - Don't do default PageSetup()
- # 1 - Do default PageSetup()
- # list - list containing ordinality of 'Page Setup' menuItem.
- # pPrinter -
- # 0 - Don't do default Printer()
- # 1 - Do default Printer()
- # list - list containing ordinality of 'Print' menuItem.
- # pQuit -
- # 0 - Don't call Quit() Task
- # 1 - Select 'Quit' - hard coded
- # 2 - KeyEq('q');
- # {list}- ord or string path to Quit menuitem, i.e.
- # {"Quit", "File"} or {17, 2}
- # Returns: None
- #
- # Example: DoCloseApp(1,2)
- #=======================================================================
- Calls: gDoCloseAppHook1, DoFiles(), logstr(), gScriptBeginCriticalHook, AboutBox(),
- gScriptEndCriticalHook, PageSetup(), Printer(), gDoCloseAppHook2,
- SaveAs(), Quit(), gDoCloseAppHook3
- Is called by:
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: Draw.Lib
- Calls: "Palette.Lib", "String.Lib","OutPut.lib", "TCS.Lib", "Geometry.Lib",
- "UserInterface.Lib", "ExceptionHandling.Lib"
-
-
- Task: InitDraw()
- Library: Draw.Lib
- Header:
- #########################################################################
- # InitDraw()
- #========================================================================
- # Author: KTA
- # Description: Initializes the Draw globals.
- # Parameters: None
- # Returns: Nada
- # Examples: InitDraw();
- # Assumptions:
- #========================================================================
- Calls:
- Is called by:
-
-
- Task: CheckObjectStruct(pObjectStruct)
- Library: Draw.Lib
- Header:
- #########################################################################
- # CheckObjectStruct(pObjectStruct)
- #========================================================================
- # Author: KTA
- # Description: Check validity of elements in pObjectStruct.
- # Parameters: pObjectStruct - the objectStruct to check
- # Returns: 0 - objectStruct is hosed
- # 1 - objectStruct is OK
- # Example: returnVal := CheckObjectStruct(pObjectStruct);
- #========================================================================
- Calls: GetElemStruct(), GetElemType(), GetElemName(), GetElemDblClk(),
- GetPointList(), GetLine(), GetColor(), GetPattern(),
- Is called by: DrawObject()
-
-
- Task: DrawObject(pObjectStruct := {}, pSpecifier := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # DrawObject(pObjectStruct, pSpecifier)
- #========================================================================
- # Author: DMM / KTA
- # Description: Main routine in the Draw Libraries. Calls all subroutines
- # necessary to draw a given object, passing the appropriate
- # elements from the pObjectStruct input param.
- # Parameters: pObjectStruct := {
- # {ToolStruct},
- # {PointList},
- # {PatternStruct},
- # {LineStruct},
- # {ColorStruct}
- # };
- # pSpecifier - Specifies the window (or Rect) to draw in)
- # Returns: 1 - exercises went OK
- # 0 - error in drawing object
- # Examples: noError := DrawObject(objectStruct,specifier);
- # DrawObject({global SelectTool, {{25,15}}, {12,2 ,’Pattern’}, 0, ‘Random’});
- #========================================================================
- Calls: MouseSpeed(), GetElemStruct(), InsertElemStruct(), GetPalNum(), GetElemType(),
- GetElemName(), GetElemDblClk(), GetElemNum(), GetSetAttribute(), SetPointList(),
- InsertPointList(), CheckObjectStruct(), PalettePicker(), SetTool(),
- InsertPattern(), InsertColor(), InsertLine(), SetAttributes(), PointListToStr(),
- LogStr(), UseClickTool(), UseDragTool(), UseDragClickTool(), UseMultiDragTool(),
- UseMultiClickTool(), UseMultiClickDragTool(), UseDragOffTool(), TCSStart(),
- DialogCheck(), TCSEnd(), gDrawObjectHook
- Is called by: DoDraw(), Draw(),
-
-
- Task: SetAttributes(pObjectStruct, pDrawObject)
- Library: Draw.Lib
- Header:
- #########################################################################
- # SetAttributes(pObjectStruct,pDrawObject)
- #========================================================================
- # Author: KTA
- # Description: This task takes a complete objectStruct as a parameter, it will
- # determine if the tool being used to draw with can set various
- # attributes (patterns, lines, and colors). If so the appropriate
- # tasks will be called and the actual attribute structs used will
- # be inserted into the objectStruct prior to returning.
- # Parameters: pObjectStruct - a complete objectStruct - note some elements will
- # evaluate to 0 or random upon entry - the random
- # elements will be replaced with actual atribute
- # struct prior to exiting. Elements that are 0 will
- # not be set.
- # pDrawObject - This is the number that is used to tie together
- # all elements that make up an object for TCS
- # logging purposes.
- # Returns: pObjectStruct - Setting attributes went OK
- # 0 - error in - Setting attributes
- # Examples:
- #========================================================================
- Calls: GetElemStruct(), SetObjectAttribute(),
- Is called by: DrawObject(),
-
-
- Task: SetObjectAttribute(pObjectStruct, pElemStruct, pDrawObject, pFlagTask,
- pGetAttributeTask, pSetAttributeTask, pInsertAttributeTask,
- pAttributeName)
- Library: Draw.Lib
- Header:
- #########################################################################
- # SetObjectAttribute(pObjectStruct,pDrawObject)
- #========================================================================
- # Author: ML
- # Description: Sets an objects attribute and returns the updated object structure.
- # Parameters: pObjectStruct - a complete objectStruct - note some elements will
- # evaluate to 0 or random upon entry - the random
- # elements will be replaced with actual atribute
- # struct prior to exiting. Elements that are 0 will
- # not be set.
- # pDrawObject - This is the number that is used to tie together
- # all elements that make up an object for TCS
- # logging purposes.
- # Returns: pObjectStruct - Setting attributes went OK
- # 0 - error in - Setting attributes
- # Examples:
- #========================================================================
- Calls: pFlagTask, pGetAttributeTask, pSetAttributeTask, pInsertAttributeTask,
- #### NB: This task calls the task references passed to it.
- Is called by: SetAttributes()
-
-
- Task: UseClickTool(pPointList, pSpecifier)
- Library: Draw.Lib
- Header:
- #########################################################################
- # UseClickTool()
- #========================================================================
- # Author: DMM
- # Description: Move to point and click once.
- # Parameters: pPointList - List containing a point.
- # pSpecifier - Window specifier for the window to move relative to.
- # Returns: 1 - Clicked
- # Examples: UseClickTool();
- # Assumptions: None
- #========================================================================
- Calls: TCSStart(), MoveRelativeToWindow(), TCSEnd()
- Is called by: DrawObject()
-
-
- Task: UseDragTool(pPointList:= {}, pSpecifier := 0, pMouseDown := 6,
- pDClickToEnd := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # UseDragTool(pPointList, pSpecifier, pMouseDown, pDClickToEnd)
- #========================================================================
- # Author: DMM
- # Description: Drag from the current location.
- # Parameters: pPointList - Point to move to.
- # pSpecifier - Window specifier in which to drag in.
- # pMouseDown - 0 - don't hold mouse key down while moving
- # 1 - press mouse key down - move - release
- # 2 - Click after moving - no mouse down during move
- # 3 - press mouse key down - move - don't release
- # 4 - move - release
- # pDClickToEnd - Boolean flag indicating whether or not to double
- # click the mouse after dragging.
- # Returns: returnVal - what moveRelativeToWindow returns.
- # Examples: UseDragTool({{100,200},{200,200}}, 0, 1,0);
- # Assumptions: All points are specified relative to window.
- #========================================================================
- Calls: TCSStart(), MoveRelativeToWindow(), _doubleClick(), TCSEnd()
- Is called by: DrawObject()
-
-
- Task: UseDragClickTool(pPointList:= {}, pSpecifier := 0, pMouseDown := 1,
- pDClickToEnd := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # UseDragClickTool(pPointList, pSpecifier, pMouseDown, pDClickToEnd)
- #========================================================================
- # Author: KTA
- # Description: Drag from the current location. Then click at a different point.
- # Parameters: pPointList - List of points to move to.
- # pSpecifier - Window specifier in which to drag in.
- # pMouseDown - 0 - don't hold mouse key down while moving
- # 1 - press mouse key down - move - release
- # 2 - Click after moving - no mouse down during move
- # 3 - press mouse key down - move - don't release
- # 4 - move - release
- # pDClickToEnd - Boolean flag indicating whether or not to double
- # click the mouse after dragging.
- # Returns: returnVal - what MoveRelativeToWindow returns.
- # Examples: UseDragClickTool({{100,200},{100,200}, {200,300}},0,1,0);
- # Assumptions: All points are specified relative to window.
- #========================================================================
- Calls: TCSStart(), MoveRelativeToWindow(), _doubleClick(), TCSEnd()
- Is called by: DrawObject()
-
-
- Task: UseMultiDragTool(pPointList := {}, pSpecifier := 0, pDClickToEnd := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # UseMultiDragTool(pPointList, pSpecifier, pDClickToEnd)
- #========================================================================
- # Author: DMM
- # Description: mouseDown-drag-drag-drag-drag-release.
- # Parameters: pPointList - List of points to move to.
- # pSpecifier - Window specifier in which to drag in.
- # pDClickToEnd - Boolean flag indicating whether or not to double
- # click the mouse after dragging.
- # Returns: returnVal - what MoveRelativeToWindow returns.
- # Examples: UseMultiDragTool({{100,200}, {200,300}},0,0);
- # Assumptions: All points are specified relative to window.
- #========================================================================
- Calls: TCSStart(), MoveRelativeToWindow(), _doubleClick(), TCSEnd()
- Is called by: DrawObject()
-
-
- Task: TASK UseMultiClickTool(pPointList, pSpecifier := 0, pDClickToEnd := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # UseMultiClickTool(pPointList, pSpecifier, pDClickToEnd)
- #========================================================================
- # Author: DMM
- # Description: click-move-click-move….
- # Parameters: pPointList - List of points to move to.
- # pSpecifier - Window specifier in which to drag in.
- # pDClickToEnd - Boolean flag indicating whether or not to double
- # click the mouse after dragging.
- # Returns: returnVal - what MoveRelativeToWindow returns.
- # Examples: UseMultiClickTool({{100,200}, {200,300}},0,0);
- # Assumptions: All points are specified relative to window.
- #========================================================================
- Calls: TCSStart(), MoveRelativeToWindow(), _doubleClick(), TCSEnd()
- Is called by: DrawObject()
-
-
- Task: UseMultiClickDragTool(pPointList, pSpecifier := 0, pDClickToEnd := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # UseMultiClickDragTool(pPointList, pSpecifier, pDClickToEnd)
- #========================================================================
- # Author: KTA
- # Description: mouseDown-drag-mouseUp-mouseDown-drag-mouseUp….
- # Parameters: pPointList - List of points to move to.
- # pSpecifier - Window specifier in which to drag in.
- # pDClickToEnd - Boolean flag indicating whether or not to double
- # click the mouse after dragging.
- # Returns: Nothing
- # Examples: UseMultiClickDragTool();
- # Assumptions: All points are
- # specified relative to window.
- #========================================================================
- Calls: TCSStart(), MoveRelativeToWindow(), _doubleClick(), TCSEnd()
- Is called by: DrawObject()
-
-
- Task: UseDragOffTool(pPointList:= {}, pSpecifier := 0, pMouseDown := 1,
- pDClickToEnd := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # UseDragOffTool(pPointList, pSpecifier, pMouseDown, pDClickToEnd)
- #========================================================================
- # Author: KTA
- # Description: Drag Tool into the content region of the window.
- # Parameters: pPointList - Point to move to.
- # pSpecifier - Window specifier in which to drag in.
- # pMouseDown - 0 - don't hold mouse key down while moving
- # 1 - press mouse key down - move - release
- # 2 - Click after moving - no mouse down during move
- # 3 - press mouse key down - move - don't release
- # 4 - move - release
- # pDClickToEnd - Boolean flag indicating whether or not to double
- # click the mouse after dragging.
- # Returns: returnVal - what moveRelativeToWindow returns.
- # Examples: UseDragOffTool({{100,200}}, 0, 1,0);
- # Assumptions: All points are specified relative to window.
- #========================================================================
- Calls: TCSStart(), MoveRelativeToWindow(), _doubleClick(), TCSEnd()
- Is called by: DrawObject()
-
-
- Task: GetElemStruct()
- GetPointList()
- GetPattern()
- GetLine()
- GetColor()
- GetGradient()
- GetBackgroundColor()
- GetTextColor()
- GetPenPattern()
-
- InsertElemStruct()
- InsertPointList()
- InsertPattern()
- InsertLine()
- InsertColor()
- InsertGradient()
- InsertBackgroundColor()
- InsertTextColor()
- InsertPenPattern()
- Library: Draw.Lib
- Header:
- #########################################################################
- # Object Structure Accessors()
- #========================================================================
- # Author: DMM
- # Description: These functions access the data in an objectStruct data
- # structure.
- # Parameters: objectStruct
- # Returns: the requested data element or list
- #========================================================================
- Calls:
- Is called by: Draw.Lib routines
-
-
- Task: MakePointList(pInset :={ 0,0,20,20 } , pSpecifier := 0,
- pNumPoints := global gNumPoints, pClosed := 0, pVoidRect := {} )
- Library: Draw.Lib
- Header:
- #########################################################################
- # MakePointList( pInset, pSpecifier, pNumPoints, pClosed, pVoidRect )
- #========================================================================
- # Author: DMM
- # Description: Generates a list of random points
- # Parameters: pInset - inset into window for ppoints to be generated.
- # pSpecifier - Window specifier for the window to generate points in.
- # pNumPoints - number of points to comprise the object
- # pClosed - 1 for closed object (first-last point the same)
- # 0 for open object (first-last point different)
- # pVoidRect - no points in object should be in this rectangle
- # Returns: List of Points.
- # Examples: theObject := MakePointList(rect); # 4 point closed object
- # theObject := MakePointList(theWindow.r, 4,1,thePalette.r);
- #========================================================================
- Calls: GetRandomPointsRelativeToWindow(), PtInRect(),
- Is called by: SetPointList()
-
-
- Task: SetTool(pTool := 'Random', pSelectTool := 1, pObjectNumber := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # SetTool(pTool,pSelectTool, pObjectNumber)
- #========================================================================
- # Author: KTA
- # Description: This task takes a ToolStruct as a parameter. If the ToolStruct
- # evaluates to 'Random' a ToolStruct will be generated randomly.
- # If the pSelectTool evaluates to true the tool will also be selected.
- # Otherwise, the generated toolStruct will be returned without
- # selecting the tool.
- # Parameters: pTool - 0 - nothing done return 0
- # - Valid ToolStruct
- # - 'Random' - generates a random ToolStruct
- # pSelectTool - Boolean flag which indicates whether or not to
- # select the tool.
- # pObjectNumber - Integer used to track all elements that make up
- # an object - TCS related.
- # Returns: 0 - nothing done 0 passed in.
- # Valid toolStruct
- # Assumptions: All draw related data structures set up properly.
- #========================================================================
- Calls: PalettePicker()
- Is called by: DrawObject(), GenerateObject()
-
-
- Task: GenerateObject(pTheObject := {'Random','Random','Random','Random','Random'})
- Library: Draw.Lib
- Header:
- #########################################################################
- # GenerateObject(pTheObject)
- #========================================================================
- # Author: KTA
- # Description: This task generates valid elements for any element that evaluates
- # to 'Random'.
- # Parameters: pTheObject - A complete Object Struct. The default is to
- # generate all elements of the returned object
- # randomly. Passing in partially completed object
- # struct will replace the elements which evaluate
- # to 'Random' with valid data.
- # Returns: pTheObject - a complete objectStruct no elements will evaluate
- # to 'Random'
- # Examples: GenerateObject({global PointerTool,'Random',0,'Random','Random'})
- # Assumptions: All the necessary Draw Structs have been defined correctly.
- #========================================================================
- Calls: GetElemStruct(), SetTool(), InsertElemStruct(), GetPointList(), SetPointList(),
- InsertPointList(), GetPattern(), SetPattern(), InsertPattern(), GetLine(),
- SetLine(), InsertLine(), GetColor(), SetColor(), InsertColor()
- Is called by:
-
-
- Task: SetPointList(pTheObject, pSpecifier := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # SetPointList(pTheObject, pSpecifier)
- #========================================================================
- # Author: KTA
- # Description: Determines the number of points required for a given tool type.
- # Then calls MakePointList() to generate pointlist for different
- # tool types.
- # kClick tools - require a single point.
- # kDrag tools - require a two points.
- # All multipoint tools - access the global gNumPoints to
- # determine the number of points.
- # Parameters: pTheObject - a complete objectStruct with atleast a valid
- # ToolStruct.
- # pSpecifier - Specifier of the window in which to generate
- # points in.
- # Returns: thePointList - a list of point within <pSpecifier>
- # Examples: SetPointList(TheObjectStruct, 0);
- # Assumptions: All the necessary Draw Structs have been defined correctly.
- #========================================================================
- Calls: GetElemStruct(), GetPointList(), GetElemType(), MakePointList()
- Is called by: DrawObject(), GenerateObject(),
-
-
- Task: Draw(pTheTool := 'Random', pThePointList := 'Random', pThePattern := 'Random',
- pTheLine := 'Random', pTheColor := 'Random', pSpecifier := 0,
- pGradient := 'Random', pBGColor := 'Random', pTextColor := 'Random',
- pPenPat := 'Random')
- Library: Draw.Lib
- Header:
- #########################################################################
- # Draw(pTheTool, pThePointList, pThePattern, pTheLine, pTheColor, pSpecifier )
- #========================================================================
- # Author: KTA
- # Description: This task provides a means for defining any of the elements
- # within an ObjectStruct and allowing the libraries to generate
- # any element that evaluates to 'Random' (default for all elements)
- # Parameters: 1 parameter for each of the elements of an objectStruct and
- # 1 additional parameter for the window pSpecifier.
- # pTheTool - ToolStruct
- # pThePointList - PointList (not user definable at this time)
- # pThePattern - PatternStruct
- # pTheLine - LineStruct
- # pTheColor - ColorStruct
- # pSpecifier - Window or rect to draw in
- # Returns: The actual ObjectStruct after generating 'Random' elements.
- # Examples: Draw(Global SelectTool, ‘Random’,0,0,{14,3, ‘Color’})
- # Assumptions: All the necessary Draw Structs have been defined correctly.
- #========================================================================
- Calls: RandomDrawObject(), InsertElemStruct(), InsertPointList(), InsertPattern(),
- InsertLine(), InsertColor(), InsertGradient(), InsertBackgroundColor(),
- InsertTextColor(), InsertPenPattern(), DrawObject()
- Is called by:
-
-
- Task: SetColor(pTheColor := 'Random', pSelectColor := 1, pObjectNumber := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # SetColor(pTheColor, pSelectColor, pObjectNumber)
- #========================================================================
- # Author: KTA
- # Description: This is used when selecting colors from a palette.This task
- # takes a ColorStruct as a parameter. If the ColorStruct evaluates
- # to 'Random' a ColorStruct will be generated randomly.
- # If the pSelectColor evaluates to true the color will also be selected.
- # Otherwise, the generated ColorStruct will be returned without
- # selecting the color.
- # Parameters: pTheColor - 0 - nothing done return 0
- # - Valid ColorStruct
- # - 'Random' - generates a random ColorStruct
- # pSelectColor - Boolean flag which indicates whether or not to
- # select the Color.
- # pObjectNumber - Integer used to track all elements that make up
- # an object - TCS related.
- # Returns: colStruct - A valid ColorStruct
- # Examples: SetColor('Random', 1, 14);
- # Assumptions: All draw related data structures set up properly.
- #========================================================================
- Calls: SetPaletteItem()
- Is called by: GenerateObject()
-
-
- Task: SetLine(pTheLine := 'Random', pSelectLine := 1, pObjectNumber := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # SetLine(pTheLine, pSelectLine, pObjectNumber)
- #========================================================================
- # Author: KTA
- # Description: This is used when selecting line weights from a palette.
- # This task takes a LineStruct as a parameter. If the LineStruct
- # evaluates to 'Random' a LineStruct will be generated randomly.
- # If the pSelectLine evaluates to true the line will also be selected.
- # Otherwise, the generated LineStruct will be returned without
- # selecting the line weight.
- # Parameters: pTheLine - 0 - nothing done return 0
- # - Valid LineStruct
- # - 'Random' - generates a random LineStruct
- # pSelectLine - Boolean flag which indicates whether or not to
- # select the line.
- # pObjectNumber - Integer used to track all elements that make up
- # an object - TCS related.
- # Returns: LineStruct - A valid LineStruct
- # Examples: SetLine('Random', 1, 14);
- # Assumptions: All draw related data structures set up properly.
- #========================================================================
- Calls: SetPaletteItem()
- Is called by: GenerateObject()
-
-
- Task: SetLineMenuItems(pTheLine := {}, pSelectLine := 1, pObjectNumber := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # SetLineMenuItems(pTheLine, pSelectLine, pObjectNumber)
- #========================================================================
- # Author: KTA
- # Description: This is used when selecting line weights from menuItems.
- # This task takes a LineStruct as a parameter. If the LineStruct
- # evaluates to 'Random' a LineStruct will be generated randomly.
- # If the ppSelectLine evaluates to true the tool will also be selected.
- # Otherwise, the generated LineStruct will be returned without
- # selecting the line weight. This task depends upon a global
- # gLineWeights to be defined as the menuItem titles of the menuitems
- # which are used to set line wieghts.
- # Parameters: pTheLine - 0 - nothing done return 0
- # - Valid LineStruct
- # - 'Random' - generates a random LineStruct
- # pSelectLine - Boolean flag which indicates whether or not to
- # select the line.
- # pObjectNumber - Integer used to track all elements that make up
- # an object - TCS related.
- # Returns: LineStruct - A valid LineStruct
- # Examples: SetLine('Random', 1, 14);
- # Assumptions: All draw related data structures set up properly.
- #========================================================================
- Calls: TCSStart(), SelectMenuItem(), LogStr(), TCSEnd()
- Is called by:
-
-
- Task: SetPattern(pThePattern := 'Random', pSelectPattern := 1, pObjectNumber := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # SetPattern(pThePattern, pSelectPattern, pObjectNumber)
- #========================================================================
- # Author: KTA
- # Description: This is used when selecting patterns from a palette.
- # This task takes a PatternStruct as a parameter. If the PatternStruct
- # evaluates to 'Random' a PatternStruct will be generated randomly.
- # If the pSelectPattern evaluates to true the pattern will also be selected.
- # Otherwise, the generated PatternStruct will be returned without
- # selecting the pattern.
- # Parameters: pThePattern - 0 - nothing done return 0
- # - Valid PatternStruct
- # - 'Random' - generates a random PatternStruct
- # pSelectPattern - Boolean flag which indicates whether or not to
- # select the pattern.
- # pObjectNumber - Integer used to track all elements that make up
- # an object - TCS related.
- # Returns: patStruct - A valid PatternStruct
- # Examples: SetPattern('Random', 1, 14);
- # Assumptions: All draw related data structures set up properly.
- #========================================================================
- Calls: SetPaletteItem()
- Is called by: GenerateObject()
-
-
- Task: SetBackgroundColor(pBackgroundColor := 'Random', pSelectItem := 1,
- pObjectNumber := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # SetBackgroundColor(pBackgroundColor, pSelectItem, pObjectNumber)
- #========================================================================
- # Author: ML
- # Description: This is used when selecting Background Colors from a palette.
- # This task takes an element struct, item number, or "Random"
- # as a parameter. If 'Random', an element struct will be generated randomly.
- # If pSelectItem evaluates to true the element struct
- # will also be selected.
- # Parameters: pBackgroundColor - 0 - nothing done return 0
- # - Valid Item Num
- # - valid element struct
- # - 'Random' - generates a random element struct
- # pSelectItem - Boolean flag which indicates whether or not to
- # select the element.
- # pObjectNumber - Integer used to track all elements that make up
- # an object - TCS related.
- # Returns: BackgroundColorStruct - A valid BackgroundColorStruct
- # Examples: SetBackgroundColor('Random', 1, 14);
- # Assumptions: All draw related data structures set up properly.
- #========================================================================
- Calls: SetPaletteItem()
- Is called by:
-
-
- Task: SetTextColor(pTextColor := 'Random', pSelectItem := 1,
- pObjectNumber := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # SetTextColor(pTextColor, pSelectItem, pObjectNumber)
- #========================================================================
- # Author: ML
- # Description: This is used when selecting Text Colors from a palette.
- # This task takes an element struct, item number, or "Random"
- # as a parameter. If 'Random', an element struct will be generated randomly.
- # If pSelectItem evaluates to true the element struct
- # will also be selected.
- # Parameters: pTextColor - 0 - nothing done return 0
- # - Valid Item Num
- # - valid element struct
- # - 'Random' - generates a random element struct
- # pSelectItem - Boolean flag which indicates whether or not to
- # select the element.
- # pObjectNumber - Integer used to track all elements that make up
- # an object - TCS related.
- # Returns: TextColorStruct - A valid TextColorStruct
- # Examples: SetTextColor('Random', 1, 14);
- # Assumptions: All draw related data structures set up properly.
- #========================================================================
- Calls: SetPaletteItem()
- Is called by:
-
-
- Task: SetPenPattern(pPenPattern := 'Random', pSelectItem := 1,
- pObjectNumber := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # SetPenPattern(pPenPattern, pSelectItem, pObjectNumber)
- #========================================================================
- # Author: ML
- # Description: This is used when selecting pen patterns from a palette.
- # This task takes an element struct, item number, or "Random"
- # as a parameter. If 'Random', an element struct will be generated randomly.
- # If pSelectItem evaluates to true the element struct
- # will also be selected.
- # Parameters: pPenPattern - 0 - nothing done return 0
- # - Valid Item Num
- # - valid element struct
- # - 'Random' - generates a random element struct
- # pSelectItem - Boolean flag which indicates whether or not to
- # select the element.
- # pObjectNumber - Integer used to track all elements that make up
- # an object - TCS related.
- # Returns: PenPatternStruct - A valid PenPatternStruct
- # Examples: SetPenPattern('Random', 1, 14);
- # Assumptions: All draw related data structures set up properly.
- #========================================================================
- Calls: SetPaletteItem()
- Is called by:
-
-
- Task: SetGradient(pGradient := 'Random', pSelectItem := 1,
- pObjectNumber := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # SetGradient(pGradient, pSelectItem, pObjectNumber)
- #========================================================================
- # Author: ML
- # Description: This is used when selecting gradients from a palette.
- # This task takes an element struct, item number, or "Random"
- # as a parameter. If 'Random', an element struct will be generated randomly.
- # If pSelectItem evaluates to true the element struct
- # will also be selected.
- # Parameters: pGradient - 0 - nothing done return 0
- # - Valid Item Num
- # - valid element struct
- # - 'Random' - generates a random element struct
- # pSelectItem - Boolean flag which indicates whether or not to
- # select the element.
- # pObjectNumber - Integer used to track all elements that make up
- # an object - TCS related.
- # Returns: GradientStruct - A valid GradientStruct
- # Examples: SetGradient('Random', 1, 14);
- # Assumptions: All draw related data structures set up properly.
- #========================================================================
- Calls: SetPaletteItem()
- Is called by:
-
-
- Task: SetPaletteItem(pPaletteItem := 'Random', pSelectItem := 1, pPaletteName:= "",
- pPaletteNum:= 0, pObjectNumber := 0)
- Library: Draw.Lib
- Header:
- #########################################################################
- # SetPaletteItem(pThePattern, pSelectPattern, pObjectNumber)
- #========================================================================
- # Author: ML
- # Description: This is used when selecting an item from a palette.
- # This task takes a palette item number as a parameter. If the palette item number
- # evaluates to 'Random' a palette item struct will be generated randomly.
- # If the pSelectPattern evaluates to true the palette item will also be selected.
- # Otherwise, the generated palette item struct will be returned without
- # selecting the palette item.
- # Parameters: pPaletteItem - 0 - nothing done return 0
- # - Valid Palette Item Num
- # - valid Palette item struct
- # - 'Random' - generates a random palette item struct
- # pSelectItem - Boolean flag which indicates whether or not to
- # select the palette item.
- # pPaletteName - string describing the name of the palette
- # pPaletteNum - the palette's position within the global gPaletteList
- # pObjectNumber - Integer used to track all elements that make up
- # an object - TCS related.
- # Returns: ItemStruct - A valid palette item struct
- # Examples: SetPaletteItem({ 8,3,"pattern" },0, "pattern", global kPatternPaletteNum);
- # Assumptions: All draw related data structures set up properly.
- #========================================================================
- Calls: GetRandomElement(), PalettePicker()
- Is called by: SetColor(), SetLine(), SetPattern(), SetBackgroundColor(),
- SetTextColor(), SetPenPattern(), SetGradient(),
-
-
- Task: CheckSetup()
- Library: Draw.Lib
- Header:
- #########################################################################
- # CheckSetup()
- #========================================================================
- # Author: KTA
- # Description: Reports the current state of various draw related
- # globals and global structures. Call this task after a script
- # has defined all of its draw related globals. This routine will
- # print the current setting. A review of the output could help
- # to reveal any problems with the initial setup.
- # Parameters: none
- # Returns: nothing
- # Examples: CheckSetup();
- #========================================================================
- Calls: PalettePicker(),
- Is called by:
-
-
- Task: RandomDrawObject()
- Library: Draw.Lib
- Header:
- #########################################################################
- # RandomDrawObject()
- #========================================================================
- # Author: ML
- # Description: Generate a draw object with 'random' for all items.
- # Parameters: none
- # Returns: a draw object with 'random' for all items
- # Examples: RandomDrawObject();
- #========================================================================
- Calls:
- Is called by: Draw()
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: ExceptionHandling.lib
- Calls:
-
-
- Task: AddExceptionHandler(pExceptionCode, pExceptionHandler)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # AddExceptionHandler(pTheErrorList)
- #========================================================================
- # Description: pushes error list onto the global error handling stack
- # Parameters: pExceptionCode - (string, integer, List)
- # The code to identify the exception
- # pExceptionHandler - {list}
- # the Handler in the form: {Task reference,{Parameters} ThrowFlag}
- # Returns: true if it worked, false if not
- # Examples: AddExceptionHandler(-1100, {TASK crashRecover,{ "TeachText",1,5 },1});
- # Assumptions: none
- #========================================================================
- Calls:
- Is called by:
-
-
- Task: RemoveExceptionHandler(pTheError)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # RemoveExceptionHandler(pTheError)
- #========================================================================
- # Description: pop first instance of pTheError off the global error handling stack
- # Parameters: pTheError
- # Returns: true if it worked, false if not
- # Examples: RemoveExceptionHandler(-1100);
- # Assumptions: none
- #========================================================================
- Calls:
- Is called by:
-
-
- Task: SpecialHandlers(pErrorCode, pHanderList)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # SpecialHandlers()
- #========================================================================
- # Description:
- # Parameters:
- # Returns: true if it worked, false if not
- # Examples: SpecialHandlers(-);
- # Assumptions: none
- #========================================================================
- Calls:
- Is called by: ExceptionDispatcher()
-
-
- Task: ExceptionDispatcher(pErrorCode, pHandleTheError:= 0, pErrorContext := {})
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # ExceptionDispatcher(pErrorCode, pHandleTheError)
- #========================================================================
- # Description: A mechanism for handling errors
- # Parameters: pErrorCode: The error code
- # Returns: result of error handler TASK call, or throw if fatal
- # Examples: ExceptionDispatcher(-1100)
- # Assumptions: VU 2.1, also needs a list of error codes/handlers defined in
- # global gExceptionHandlerList in the form:
- # { {
- # ErrCode, # Error Code
- # {
- # Handler, # TASK reference
- # {Parameters}, # List of Parameters
- # ThrowFlag # Flag indicating whether you want errors
- # } # with this code to be thrown
- # }, …
- # };
- #========================================================================
- Calls: gExceptionDispatcherHook, SpecialHandlers()
- Is called by: DA.Lib, _Match(), _MatchBoolean(), _Select(), _SelectBoolean(),
- _Drag(), _Size(), _Close(), _Zoom(), _Scroll(), _Type(),
- _PressKey(), _ReleaseKey(), _Move(), _Click(), _DoubleClick(),
- _PressMouse(), _ReleaseMouse(), _Launch(), _Collect(),
- _Gestalt(), _DebugStr(), FileToolOperations.Lib, Geometry.lib,
- IvyOperations.Lib, LaunchQuit.Lib, MemoryMonitorOperations.Lib,
- OnTargetOperations.Lib, Select.Lib, StandardFile.Lib,
- TargetCheck.Lib, TCS.Lib, TimingBasics.Lib, TimingOperations.lib,
- UserInterface.Lib, WorldReady.Lib
-
-
- Task: DefaultExceptionHandler(pErrID, pParamList)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # DefaultExceptionHandler(pErrID, pParamList)
- #========================================================================
- # Description: Simple exception Handler that just prints the error code
- # and the list of parameters. We may add more as soon as
- # we figure out what functionality to add.
- # Parameters: pErrID: the error code
- # pParamList: list of parameters
- # Returns: 1
- # Examples: DefaultExceptionHandler({"param1", 2, {'param3'}})
- # Assumptions: VU 2.1
- #========================================================================
- Calls:
- Is called by: ExceptionDispatcher()
-
-
- Task: _Match(pDescriptor := [target], pExactFlag := 0)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _Match(pDescriptor, pExactFlag)
- #========================================================================
- # Description: Error checking prototype for descriptor matching
- # Parameters: pTheDesc: the descriptor to match, always looks for exact
- # (don't include '!')
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _Match([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: SetFont(), SetStyle(), SetSize(), Twitcher(), MiniLaunch(),
- LaunchTwitch(), PageSetup(), Printer(), IsStandardFile(),
- ApplicationVerification(), CheckforSystemFailure(),
- ScrollWindow(), SwitchScript()
-
-
- Task: _MatchBoolean(pDescriptor := [target], pExactFlag := true)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _MatchBoolean(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor matching
- # Parameters: pTheDesc: the descriptor to match, always looks for exact
- # (don't include '!')
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _MatchBoolean([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: DefaultCrashHandler(), ReacquireTarget(), Twitcher(), MiniLaunch(),
- Quit(), QuitBackgroundApps(), LaunchAssist(), LaunchByTypeSelect(),
- LaunchTwitch(), SaveAs(), SFType(), IsStandardFile(),
- CancelStandardFile(), Restart(), DragAcrossScreens(),
- SizeAcrossScreens(), DialogCheck(), DialogDismisser(),
- WhichLanguageResources(), WhichMenuIsKeyBoardMenu()
-
-
- Task: _Select(pDescriptor := [target], pExactFlag := 0)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _Select(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor selecting
- # Parameters: pTheDesc: the descriptor to select
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _Select([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: MiniLaunch(), Restart(), Twitcher(), SelectMenuItem(),
- SelectPopUpMenuItem(), SelectWindow(), SelectRadioButton(),
- SelectCheckBox(), WhichScript(), SwitchScript()
-
-
- Task: _SelectBoolean(pDescriptor := [target], pExactFlag := true)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _SelectBoolean(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor matching
- # Parameters: pTheDesc: the descriptor to select, always looks for exact
- # (don't include '!')
- # Returns: 0 - couldn't select
- # 1 - successful select
- # Examples: _SelectBoolean([menuitem t:"Open" m: [menu t:"File"]]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by:
-
-
- Task: _Drag(pDescriptor := [target], pHow := 'a', pCoords := {}, pExactFlag := 0)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _Drag(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor selecting
- # Parameters: pTheDesc: the descriptor to select
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _Drag([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: DragWindow()
-
-
- Task: _Size(pWindowDesc := [window o:1], pHow := 'wh', pCoords := {}, pExactFlag := 0)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _Size(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor selecting
- # Parameters: pWindowDesc: the window descriptor to select
- # pHow: how to size
- # r - relative
- # w - width only
- # h - height only
- # wh - both width and height
- # pCoords: list of coord(s). Single element list if pHow is
- # w or h, two element list (width, height) if r or wh.
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _Size([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by:
-
-
- Task: _Close(pDescriptor := [], pExactFlag := 0)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _Close(pDescriptor, pExactFlag)
- #========================================================================
- # Description: Error checking prototype for descriptor matching
- # Parameters: pTheDesc: the descriptor to match, always looks for exact
- # (don't include '!')
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _Close([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: CloseWindow()
-
-
- Task: _Zoom(pDescriptor := [], pExactFlag := 0)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _Zoom(pDescriptor, pExactFlag)
- #========================================================================
- # Description: Error checking prototype for descriptor matching
- # Parameters: pTheDesc: the descriptor to match, always looks for exact
- # (don't include '!')
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _Zoom([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by:
-
-
- Task: _Scroll(pDescriptor := [target], pHow := 'a', pCoords := {}, pExactFlag := 0)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _Scroll(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor selecting
- # Parameters: pTheDesc: the descriptor to select
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _Scroll([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: Scrapbook()
-
-
- Task: _Type(pKeyList := {}, pCodeList := {}, pPad := 0, pKeyStrokesFirst := 1)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _Type(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor selecting
- # Parameters: pTheDesc: the descriptor to select
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _Scroll([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: PageSize(), SFType(), ReplaceExist(), TypeWord(), TypeSentence(),
- TypeParagraph(), KeyEq(), TypeStr(), TypeList(), SpecialKey(),
- SwitchScript(), TypeEnglishText(), TypeJapaneseString(),
- TypeSimplifiedChineseString(), TypeTradChineseString()
-
-
- Task: _PressKey(pKeyList := {}, pCodeList := {}, pPad := 0)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _PressKey(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor selecting
- # Parameters: pTheDesc: the descriptor to select
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _PressKey([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: HereToStartSelect(), HereToEndSelect(), SelectAll(),
- RandomTextSelection(), KeyEq(), SwitchScript(),
- TypeSimplifiedChineseString(), TypeTradChineseString()
-
-
- Task: _ReleaseKey(pKeyList := {}, pCodeList := {}, pPad := 0)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _ReleaseKey(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor selecting
- # Parameters: pTheDesc: the descriptor to select
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _ReleaseKey([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: HereToStartSelect(), HereToEndSelect(), SelectAll(),
- RandomTextSelection(), KeyEq(), SwitchScript(),
- TypeSimplifiedChineseString(), TypeTradChineseString()
-
-
- Task: _Move(pHow := 'a', pCoords := {})
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _Move(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor selecting
- # Parameters: pTheDesc: the descriptor to select
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _Move([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: SFSelectPopupMenuItem(), PerformScroll(), SelectButton(),
- MoveMouse(),
-
-
- Task: _Click()
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _Click(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor selecting
- # Parameters: pTheDesc: the descriptor to select
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _Click([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: RectSelect(), HereToStartSelect(), HereToEndSelect(), SelectAll(),
- SelectButton(), MoveMouse()
-
-
- Task: _DoubleClick()
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _DoubleClick(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor selecting
- # Parameters: pTheDesc: the descriptor to select
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _DoubleClick([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: UseDragTool(), UseDragClickTool(), UseMultiDragTool(),
- UseMultiClickTool(), UseMultiClickDragTool(), UseDragOffTool()
-
-
- Task: _PressMouse()
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _PressMouse(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor selecting
- # Parameters: pTheDesc: the descriptor to select
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _PressMouse([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: SelFromPopUp(), SelFromMenuItemPopUp(), SFSelectPopupMenuItem(),
- PerformScroll(), MoveMouse()
-
-
- Task: _ReleaseMouse()
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _ReleaseMouse(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor selecting
- # Parameters: pTheDesc: the descriptor to select
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _ReleaseMouse([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: SelFromPopUp(), SelFromMenuItemPopUp(), SFSelectPopupMenuItem(),
- PerformScroll(), MoveMouse()
-
-
- Task: _Launch(pApplication := '', pOntarget := TRUE)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _Launch(pTheDesc)
- #========================================================================
- # Description: Error checking prototype for descriptor selecting
- # Parameters: pTheDesc: the descriptor to select
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _Launch([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by:
-
-
- Task: _Collect(pDescriptor := [target], pExactFlag := 0)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _Collect(pDescriptor, pExactFlag)
- #========================================================================
- # Description: Error checking prototype for descriptor matching
- # Parameters: pTheDesc: the descriptor to match, always looks for exact
- # (don't include '!')
- # Returns: 0 - couldn't match
- # 1 - successful match
- # Examples: _Collect([window o:1]);
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: ReportSelectedMenuItems(), PrintAlert(), SaveAs(), ReplaceExist(),
- IsStandardFile(), Restart(), RecordMonitorInfo(), TestWindow(),
- AdjustRectToScreen(), GetVHScrollBars(), FindWindow(),
- DialogCheck(), WhichScript()
-
-
- Task: _Gestalt(pSelector)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _Gestalt(pSelector)
- #========================================================================
- # Description: Error checking for gestalt
- # Parameters: pSelector: gestalt selector
- # Returns: 0 - unsuccesful gestalt call
- # {list} - gestalt result
- # Examples: _Gestalt('sysv');
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: Check32Bit(), CheckVM(), GestaltFPUType(), GestaltMachineType(),
- GestaltProcessorType(), GestaltMMUType(), GestaltLogicalRAMSize(),
- GestaltPhysicalRAMSize(), GestaltSystemArchitecture(),
- MachineState(), IsSystem7()
-
-
-
- Task: _DebugStr(pTheString, pAtSystemTaskTime := false)
- Library: ExceptionHandling.lib
- Header:
- #########################################################################
- # _DebugStr(pTheString, pAtSystemTaskTime)
- #========================================================================
- # Description: Invokes our exceptionHandling mechanism for the DebugStr call.
- # Parameters: pTheString: debug string e.g. ';ht'
- # pAtSystemTaskTime - indicate interupt or systemTask time
- # Returns: nothing
- # Examples: _DebugStr(';ht;g');
- # Assumptions: VU 2.1
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: InstallEveryTimeMacro(),
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: FileToolOperations.Lib
- Calls: "FileTool.vuLib", "Output.Lib", "String.Lib", "ExceptionHandling.Lib"
-
-
- Task: _FileTool(pServiceOrTask, pParamList := {}, pOnTarget := true,
- pIsRetry := 0)
- Library: FileToolOperations.Lib
- Header:
- #########################################################################
- # _FileTool(pOnTheTarget := true)
- #========================================================================
- # Author: KTA
- # Description: Does the exception handling for the Filetool. All high level tasks
- # should call this routine for file tool services or tasks within the
- # FileTool.vulib. Handles initialization of tool automatically.
- # Parameters: pServiceorTask - Name of the Service or task
- # pParamList - List of parameters
- # pOnTarget - Flag to indicate whether the service should be performed
- # the host or the target. 1 = target/0 = host.
- # Returns: What ever the file tool returns - list of three elements
- # { errCode, Data, [error message]}
- # Examples: _FileTool('ReadUntil', {'HD:FileName'},1);
- # Assumptions: None
- #========================================================================
- Calls: FileTool(), ExceptionDispatcher(), _FileTool()
- Is called by: GatherTargetCrashLog(), InstallEveryTimeMacro(), _FileTool(),
- InitFileTool(), QuitFileTool(), ReadTheLine(), ExistsOrCreate(),
- MoveTheFile(), DoesFileExist(), PathToSpecialFolder(),
- NameOfBootVolume(), DeleteTheFile(), CopyFileToPath(),
- ProfileApplication()
-
-
- Task: InitFileTool(pOnTheTarget := true)
- Library: FileToolOperations.Lib
- Header:
- #########################################################################
- # InitFileTool(pOnTheTarget := true)
- #========================================================================
- # Author: KTA
- # Description: Initializes the FileTool
- # Parameters: pOnTheTarget - True if you want to launch the FileTool on
- # the target machine. False if on the Host.
- # Returns: 0 - Couldn't initialize
- # 1 - Init On Target
- # 2 - Init On Host
- # Examples: InitFileTool();
- # Assumptions: None
- #========================================================================
- Calls: _FileTool(),
- Is called by:
-
-
- Task: QuitFileTool(pOnTheTarget := true)
- Library: FileToolOperations.Lib
- Header:
- #########################################################################
- # QuitFileTool()
- #========================================================================
- # Author: KTA
- # Description: Quits the FileTool
- # Parameters: none
- # Returns: 0 - Couldn't Quit
- # 1 - Quit Successfully
- # Examples: QuitFileTool();
- # Assumptions: None
- #========================================================================
- Calls: _FileTool(),
- Is called by: InstallEveryTimeMacro(), GatherTargetCrashLog()
-
-
- Task: ReadTheLine( pFileReference, pFromPosition := 0, pOnTarget := true )
- Library: FileToolOperations.Lib
- Header:
- #########################################################################
- # ReadTheLine( pFileReference, pFromPosition )
- #========================================================================
- # Author: KTA
- # Description: Similar to ReadLine in ?FileTool.vulib except this routine does the error
- # checking and will return 0 if an error occur otherwise it will
- # what the line that was read (2nd element of what theFileTool returned)
- # Parameters: pFileReference - File to read from.
- # pFromPosition - position to begin reading from.
- # Returns: 0 - Some Error
- # String - line read
- # Examples: ReadTheLine('hd:myFile', 0);
- # Assumptions: None
- #========================================================================
- Calls: _Filetool
- Is called by:
-
-
- Task: ExistsOrCreate(pFileName, pOnTarget := true )
- Library: FileToolOperations.Lib
- Header:
- #########################################################################
- # ExistsOrCreate()
- #========================================================================
- # Author: KTA
- # Description: Checks to see if the <pFileName> exists - creates one if it does not.
- # Parameters: pFileName - full path of file
- # Returns: 0 - Fail (doesn't exist, couldn't create)
- # 1 - File Existed
- # 2 - Created File
- # 3 - Created Folder
- # Examples: ExistsOrCreate();
- # Assumptions: None
- #========================================================================
- Calls: _FileTool(),
- Is called by: GatherTargetCrashLog(),
-
-
- Task: MoveTheFile(pSourcePath, pDestinationPath, pOnTarget := true )
- Library: FileToolOperations.Lib
- Header:
- #########################################################################
- # MoveTheFile(pSourcePath, pDestinationPath)
- #========================================================================
- # Author: KTA
- # Description: Moves Files from <pSourcePath> to <pDestinationPath>
- #
- # Parameters: pSourcePath - (String) Fullpath location of file to be moved. Should
- # be in the form: "HD:Folder:FileName".
- # pDestinationPath - (String) Fullpath location where file should be
- # moved to. Should be in the form: "HD:Folder:FileName2" where
- # FileName2 is the new name for the file.
- #
- # Returns: 0 - error occured
- # integer - file reference for file moved.
- # Assumptions: File exists in <pSourcePath> and <pDestinationPath> is a valid path.
- # This routine does not check to see if either exist nor does it
- # return errors if either is not found.
- #========================================================================
- Calls: _FileTool(), LogStr()
- Is called by:
-
-
- Task: DoesFileExist(pFilePath := "", pOnTarget := true)
- Library: FileToolOperations.Lib
- Header:
- #########################################################################
- # DoesFileExist(pFilePath)
- #========================================================================
- # Author: KTA
- # Description: This task checks to see if the file <pFilePath> exists.
- # Parameters: pFilePath - full path to a file.
- # Returns: 0 - File does not exist.
- # 1 - file exists
- #========================================================================
- Calls: _FileTool()
- Is called by: InstallEveryTimeMacro(), CopyFileToPath()
-
-
- Task: PathToSpecialFolder(pSpecialFolder := '', pOnTarget := true)
- Library: FileToolOperations.Lib
- Header:
- #########################################################################
- # PathToSpecialFolder()
- #========================================================================
- # Author: KTA
- # Description: Returns the path to the special folder.
- # Parameters: None
- # Returns: 0 - error occured
- # string - full path to system folder in following format:
- # "hd:Systemfolder"
- # x := PathToSpecialFolder("extn" );
- # x := PathToSpecialFolder("ctrl" );
- # x := PathToSpecialFolder("macs" );
- #========================================================================
- Calls: _FileTool()
- Is called by: InstallEveryTimeMacro(), CopyFileToPath()
-
-
- Task: NameOfBootVolume(pOnTarget := true)
- Library: FileToolOperations.Lib
- Header:
- #########################################################################
- # NameOfBootVolume()
- #========================================================================
- # Author: KTA
- # Description: Returns the name of the boot volume
- # Parameters: None
- # Returns: 0 - error occured
- # string - Name of the boot volume
- #========================================================================
- Calls: _FileTool()
- Is called by: InstallEveryTimeMacro(),
-
-
- Task: DeleteTheFile(pFileName, pOnTarget := true)
- Library: FileToolOperations.Lib
- Header:
- #########################################################################
- # DeleteTheFile(pFileName)
- #========================================================================
- # Author: KTA
- # Description: Deletes the file <pFileName>
- # Parameters: pFileName - full path to the file to be deleted.
- # Returns: 0 - error occured
- # 1 - file was deleted properly
- #========================================================================
- Calls: _FileTool()
- Is called by: GatherTargetCrashLog()
-
-
- Task: CopyFileToPath(pFileToCopy := '', pDestinationPath := 'SystemFolder')
- Library: FileToolOperations.Lib
- Header:
- #########################################################################
- # CopyFileToPath(pFileToCopy,pDestinationPath)
- #========================================================================
- # Author: KTA
- # Description: Copies the file <pFileToCopy> to the directory specified by
- # the input parameter <pDestinationPath>.
- # Folder. This must be the full path of the file not just the filename.
- # Parameters: pFileToCopy - Full path to source file in the form: "hd:fileName"
- # Returns: 0 - error occured
- # 1 - file was copied properly
- #========================================================================
- Calls: DoesFileExist(), NumTimesCharInString(), StringAfterChar(), _FileTool()
- Is called by:
-
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: Finder.Lib
- Calls: "Output.Lib", "LaunchQuit.Lib", "StandardFile.Lib","UserInterface.Lib"
-
-
- Task: HelpBalloons( n := 2 )
- Library: Finder.Lib
- Header:
- #########################################################################
- # HelpBalloons( n )
- #========================================================================
- # Author: KTA
- # Description: Turns Help Balloons ON/OFF
- # Parameters: 0 - To turn Help Balloons - OFF
- # 1 - To turn Help Balloons - ON
- # 2 - To toggle the Hide Balloons/Show Balloons
- # Returns: Nothing
- # Examples: HelpBalloons( 0 );
- # Assumptions: 7.0x only!
- #========================================================================
- Calls: LogStr()
- Is called by:
-
-
- Task: FinderNavigate(PathList := {},OpenFlag := 1)
- Library: Finder.Lib
- Header:
- #########################################################################
- # FinderNavigate( PathList, OpenFlag )
- #========================================================================
- # Author: KTA
- # Description: Navigates in the Finder by typing. FinderNavigate insures
- # that Finder is the current app and closes all windows.
- # Then he types each item in Pathlist to select the next folder
- # and Command-'O' to open the selected folder.
- # Parameters: PathList := List of directories to open delimited by commas.
- # OpenFlag := Set to 1 to select Comand-'O' for each directory
- # in the Pathlist. If this is not true than only
- # the first item of pathlist will be typed. Use 0
- # to navigate to disks on desktop without opening.
- # Returns: nada - No way to check - cross your fingers
- # Examples: FinderNavigate({"HD","Folder1","Folder2"};
- # Assumptions: Keyboard repeat rate must be off to type navigate successfully.
- #========================================================================
- Calls: LaunchTwitch(), KeyEq(), TypeStr(), keyEq()
- Is called by:
-
-
- Task: ShimmerMateCopy(Source := {{},1}, Dest := {{},1})
- Library: Finder.Lib
- Header:
- #########################################################################
- # ShimmerMateCopy( Source, Dest )
- #========================================================================
- # Author: KTA
- # Description: Opens ShimmerMate and copies the specified file from
- # Source -> Destination. (ShimmerMate is an internal
- # Apple Tool for performing Finder operations using VU)
- # Parameters: Source[1] := Pathlist for source document
- # Source[2] := Flag for Standard File navigation
- # Dest[1] := Pathlist for Destination including new unique document
- # name.
- # Dest[2] := Flag for Standard File navigation
- #
- # Pathlist: List of directories followed by the filename
- # delimited by commas.
- # Flag:
- # 1 - Navigate using Standard File.
- # 0 - Type in path and filename delimited by ':'s.
- # Returns: 0 := Failure
- # 1 := Success
- # Example: ShimmerMateCopy({{"HD","Folder1","MacPaint"},1},{{"My_Floppy","MacPaint"},0});
- # - ShimmerMateCopy[1]; will use Standard File
- # - ShimmerMateCopy[2]; will type the path.
- # Assumptions: Shimmermate (or Alias) is in the Apple Menu.
- # Paths are correct.
- # There is room on the Destination disk (Shimmermate doesn't check)
- #========================================================================
- Calls: Launchtwitch(), selectRadioButton(), LogStr(), SFNavigate(),
- SpecialKey(), TypeList(), selectButton(),
- Is called by:
-
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: Font.Lib
- Calls: "TCS.Lib","UserInterface.Lib", "OutPut.Lib", "ExceptionHandling.Lib";
-
-
-
-
- Task: ReplaceFont(pCurrentFont,pCurrentFontRecord)
- ReplaceFontSize(pCurrentSize,pCurrentFontRecord)
- ReplaceFontStyle(pStyleList,pCurrentFontRecord)
- Library: Font.Lib
- Header:
- ##### Accessors ####
- Calls:
- Is called by: RandomFontRecords(), WaterFallFontTest(), QuickLookTextTest()
-
-
- Task: TASK InitFonts()
- Library: Font.Lib
- Header:
- #########################################################################
- # InitFonts()
- #========================================================================
- # Author: KTA
- # Description: Initializes the font globals.
- # Parameters: None
- # Returns: Nada
- # Examples: InitFonts();
- # Assumptions:
- #========================================================================
- Calls:
- Is called by:
-
-
- Task: SetFont(pMyFont := '', pObjectNumber := 'NA')
- Library: Font.Lib
- Header:
- #########################################################################
- # SetFont(pMyFont, pObjectNumber)
- #========================================================================
- # Author: KTA
- # Description: Selects <pMyFont> menuitem to set the current font.
- # Parameters: pMyFont - Name of the font.
- # pObjectNumber - Integer used to track all elements that make up
- # an Font record - TCS related.
- # Returns: returns what SelectMenuItem returns
- # 0 - failure
- # String - success
- # Examples: SetFont('Geneva');
- # Assumptions: That InitFonts() has been called thus global gCurrFontMenu
- # is set to the name of the menus which contain <pMyFont>
- #========================================================================
- Calls: FindMenu(), TCSStart(), SelectMenuItem(), _match(), TCSEnd(), LogStr()
- Is called by: Task assigned to global gSetFont in InitFonts()
-
-
- Task: SetStyle(pMyStyle := '', pObjectNumber := 'NA')
- Library: Font.Lib
- Header:
- #########################################################################
- # SetStyle(pMyStyle, pObjectNumber)
- #========================================================================
- # Author: KTA
- # Description: Sets the currently selected font style to <pMyStyle>
- # Parameters: pMyStyle - Name of the Style.
- # pObjectNumber - Integer used to track all elements that make up
- # an Font record - TCS related.
- # Returns: returns what SelectMenuItem returns
- # 0 - failure
- # String - success
- # Examples: SetStyle('Bold');
- # Assumptions: That InitFonts() has been called thus global gCurrStyleMenu
- # is set to the name of the menus which contain <pMyStyle>
- #========================================================================
- Calls: FindMenu(), TCSStart(), SelectMenuItem(), _match(), TCSEnd(), LogStr()
- Is called by: Task assigned to global gSetStyle in InitFonts()
-
-
- Task: SetSize(pMySize := '', pObjectNumber := 'NA')
- Library: Font.Lib
- Header:
- #########################################################################
- # SetSize(pMySize, pObjectNumber)
- #========================================================================
- # Author: KTA
- # Description: Sets the currently selected font size to <pMySize>
- # Parameters: pMySize - Name of the size.
- # pObjectNumber - Integer used to track all elements that make up
- # an Font record - TCS related.
- # Returns: returns what SelectMenuItem returns
- # 0 - failure
- # String - success
- # Examples: SetSize('10');
- # Assumptions: That InitFonts() has been called thus global gCurrSizeMenu
- # is set to the name of the menus which contain <pMySize>
- #========================================================================
- Calls: FindMenu(), TCSStart(), SelectMenuItem(), _match(), TCSEnd(), LogStr()
- Is called by: Task assigned to global gSetSize in InitFonts()
-
-
- Task: NextLine()
- Library: Font.Lib
- Header:
- #########################################################################
- # NextLine()
- #========================================================================
- # Author: KTA
- # Description: Prepares application to accept the next line of text
- # Parameters: None
- # gNextLineMethod =
- # 1 - ReturnKey
- # 2 - Enter Key
- # 3 - Down Arrow Key
- # 4 - Tab Key
- # {<Optional Specifier>} - if no specifier will select the
- # first document window with close and grow box.
- # Returns: Nada
- # Examples: NextLine();
- # Assumptions: global gNextLineMethod is set to the correct method required for
- # preparing the application to accept the next line of text.
- #========================================================================
- Calls: SpecialKey(), MoveRelativeToWindow()
- Is called by: Task assigned to global gNextLine in InitFonts()
-
-
- Task: RandomFontRecords(pCurrentFontRecord := {"","",""})
- Library: Font.Lib
- Header:
- #########################################################################
- # RandomFontRecords(pCurrentFontRecord)
- #========================================================================
- # Author: KTA
- # Description: Creates random font records based on the globals: gFontList,
- # gFontSizeList, gFontStyleList.
- # Parameters: pCurrentFontRecord - The script writer can define a partial record
- # and a complete record will be returned.
- # Returns: pCurrentFontRecord := {FontName, SizeName,{StyleName1, StyleName2}};
- # Examples: RandomFontRecords(); may return - {'Geneva','12'{'Bold','Italic'}}
- # Assumptions:
- #========================================================================
- Calls: ReplaceFont(), ReplaceFontSize(), ReplaceFontStyle()
- Is called by: DoText(), TypeParagraph(), TimeFontTesting()
-
-
- Task: WaterFallFontTest()
- Library: Font.Lib
- Header:
- #########################################################################
- # WaterFallFontTest()
- #========================================================================
- # Author: KTA
- # Description: Creates and executes font records based on the globals: gFontList,
- # gFontSizeList, gFontStyleList. For each Font, each defined size will
- # be selected, with each of the defined styles.
- # Parameters: None
- # Returns: nada
- # Examples: WaterFallFontTest();
- # Assumptions: global gPlainStyle is defined as the Plain style menu item
- #========================================================================
- Calls: ReplaceFont(), ReplaceFontSize(), ReplaceFontStyle(), SetFontParams(),
- ReportSelectedMenuItems(),
- Is called by: DoText()
-
-
- Task: QuickLookTextTest()
- Library: Font.Lib
- Header:
- #########################################################################
- # QuickLookTextTest()
- #========================================================================
- # Author: KTA
- # Description: Creates and executes font records based on the globals: gFontList,
- # gFontSizeList, gFontStyleList. For each Font will select
- # random size and random number of styles.
- # Parameters: none
- # Returns: nada
- # Examples: QuickLookTextTest();
- # Assumptions: global gPlainStyle is defined as the Plain style menu item
- #========================================================================
- Calls: ReplaceFont(), ReplaceFontSize(), ReplaceFontStyle(), SetFontParams()
- Is called by:
-
-
- Task: SetFontParams(pFontRecord,pResetPlainFlag := 1, pObjectNumber)
- Library: Font.Lib
- Header:
- #########################################################################
- # SetFontParams(pFontRecord, pResetPlainFlag, pObjectNumber)
- #========================================================================
- # Author: KTA
- # Description: Executes font records bycalling the routines necessary for selecting
- # the font (pFontRecord[1]) if its defined, selecting the size
- # (pFontRecord[2]) if its defined, then selecting each style defined
- # in the styleRecord (pFontRecord[3]). ReportSelectedMenuItems is then
- # called to report all of the menu items in the appropriate menus
- # with a MarkChar.
- # Parameters: pFontRecord- {Font,Size,{Style1,Style2}}
- # pResetPlainFlag -
- # 1 - Select <gPlainStyle> before executing the StyleRecord
- # loop so styles will begin at a cleared state.
- # 0 - Won't select the plain menu item.
- # pObjectNumber - Integer used to track all elements that make up
- # an Font record - TCS related.
- # Returns: By default, returns what SetStyle returns
- # Examples: SetFontParams();
- # Assumptions: global gPlainStyle is defined as the Plain style menu item
- #========================================================================
- Calls: gSetFont, gSetSize, gSetStyle, gSetStyle
- Is called by: DoText(), WaterFallFontTest(), QuickLookTextTest(), TypeParagraph()
-
-
- Task: ReportSelectedMenuItems(pMenuList, pObjectNumber := '')
- Library: Font.Lib
- Header:
- #########################################################################
- # ReportSelectedMenuItems(pMenuList, pObjectNumber)
- #========================================================================
- # Author: KTA
- # Description: Collects all the menu items with a markChar ('') from the
- # defined menus defined in pMenuList. Then types each marked item
- # and calls NextLine() to move to the next text entry line.
- # Parameters: pMenuList - List of lists/strings
- # List of menus containing marked menuitems.
- # pObjectNumber - Integer - used to track all elements that make up
- # an Font record - TCS related.
- # Returns: nada
- # Examples: ReportSelectedMenuItems({{'Format','Font'},{'Format','Styles'});
- # Assumptions:
- #========================================================================
- Calls: gReportSelectedMenuItems, _collect(), TCSStart(), TypeStr(),
- DialogCheck(), TCSEnd(), gNextLine
- Is called by: DoText(), WaterFallFontTest()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: Geometry.lib
- Calls: "ExceptionHandling.Lib";
-
-
- Task: PtInRect(thePoint,theRect)
- Library: Geometry.lib
- Header:
- #########################################################################
- # PtInRect(thePoint,theRect)
- #========================================================================
- # Author: NJV
- # Description: This routine determines whether or not thePoint
- # is contained within theRect (including borders).
- # Parameters: thePoint - a list of two integers
- # theRect - holds the coordinates of the rectangle.
- # Returns: true - point lies in the rectangle.
- # false - point does NOT lie in the rectangle.
- # Examples: isIt := PtInRect(thePoint,theRect).
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: MakePointList()
-
-
- Task: RndPtInWindow(specifier:= -1)
- Library: Geometry.lib
- Header:
- ########################################################################
- # RndPtInWindow(specifier:=-1)
- #=======================================================================
- # Author: NJV
- # Description: Returns a random point inside of the window. If specifier
- # is not passed, it will return a random point of the
- # content region of the first window with a grow and a
- # zoom box, or if there are none, then the first window
- # it finds, and if no windows are present, returns 0.
- # Parameters: specifier - title or ordinality of window
- # Returns: 0 - couldn't find window
- # Point - list of 2 coordinates - {x,y}
- # Examples: thePoint := RndPtInWindow(); # get random point in window content
- # thePoint := RndPtInWindow(1); # random point in window ordinality 1
- #=======================================================================
- Calls: RndPtInRect(), _match()
- Is called by:
-
-
- Task: RndPtInRect(theRect:=-1)
- Library: Geometry.lib
- Header:
- ########################################################################
- # RndPtInRect(theRect)
- #=======================================================================
- # Author: NJV
- # Description: Returns a random point inside of theRect. If theRect
- # is not passed, it will return a random point of the
- # content region of the first window with a grow and a
- # zoom box, or if there are none, then the first window
- # it finds, and if no windows are present, returns 0.
- # Parameters: theRect - bounding rectangle
- # Returns: 0 - Default behavior requested with no windows up
- # Point - list of 2 coordinates - {x,y}
- # Examples: thePoint := RndPtInRect(); # get random point in window content
- # thePoint := RndPtInRect({20,20,80,80}); # random point in {20,20,80,80}
- # Assumptions: None
- #=======================================================================
- Calls: _match(),
- Is called by: RndPtInWindow(),
-
-
- Task: RectInRect(rect1, rect2)
- Library: Geometry.lib
- Header:
- #########################################################################
- # RectInRect(rect1,rect2)
- #========================================================================
- # Author: SMQ
- # Description: This routine determines whether or not first rectangle
- # lies completely within the second. This is done by
- # comparing the coordinates of both rectangles.
- # Parameters: rect1 - holds the coordinates of the first rectangle.
- # rect2 - holds the coordinates of the second rectangle.
- # Returns: value - first rectangle lies in the second.
- # false - first rectangle does NOT lie in the second.
- # Examples: RectInRect(rect1,rect2).
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: CoverCompletely()
-
-
- Task: GetXYRandom(inset := { 0,0,0,0}, Rect := {}, numPts := 1)
- Library: Geometry.lib
- Header:
- ########################################################################
- # GetXYRandom(inset, Rect, numPts)
- #=======================================================================
- # Author: SL
- # Description: Returns a random X and Y coordinate in the specified
- # Rect.
- # Parameters: inset - ltrb inset from scrn or window
- # specifier > 0 window to find coords in
- # = O coords in window with s:doc g:true and c:true
- # < 0 coords in specified screen. Screen numbersta
- # is negative of specifier.
- # Returns: xyRandom - List of random X and Y. eg. { x, y }
- #=======================================================================
- Calls: ExceptionDispatcher(),
- Is called by: RandomTextSelection(), DragWindow(), SizeWindow(),
- GetRandomPointsRelativeToWindow(), MoveMouse()
-
-
- Task: CenterPointOfRect(pTheRect := {})
- Library: Geometry.lib
- Header:
- ########################################################################
- # CenterPointOfRect(pTheRect)
- #=======================================================================
- # Author: KTA
- # Description: Returns the center point of the input parameter <pTheRect>
- # Parameters: pTheRect - the rect that you want the center point of.
- # Returns: returnVal - List { x, y }
- #=======================================================================
- Calls:
- Is called by: CenterofRectClick()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: Gestalt.Lib
- Calls: "ExceptionHandling.lib";
-
-
- Task: Check32Bit()
- Library: Gestalt.Lib
- Header:
- ##################################################################################
- # Check32Bit()
- #=======================================================================
- # Author: GS
- # Description: This routine will check the state of 32 bit addressing,
- # and returns the value.
- # Parameters: None
- # Returns: Values
- # On := 1
- # Off := 0
- # not Avail := -1
- # GestaltError
- # in the first item a value described above. The second item is a text
- # string description of the value.
- #=======================================================================
- Calls: GetGestaltValue()
- Is called by: PreFlight(), MachineState()
-
-
- Task: CheckVM()
- Library: Gestalt.Lib
- Header:
- ##################################################################################
- # CheckVM()
- #=======================================================================
- # Author: GS
- # Description: Checks to see if VM is turned on.
- #
- # Parameters: None
- # Returns: On := 1
- # Off := 0
- # not Avail := -1
- # GestaltError
- # if VM is on gestalt('vm ') returns a 1
- # any other case (not available, not turned on is a 0)
- #=======================================================================
- Calls: GetGestaltValue()
- Is called by: MachineState()
-
-
- Task: LowWordOfAnswer(Answer)
- Library: Gestalt.Lib
- Header:
- ##################################################################################
- # LowWordOfAnswer()
- #=======================================================================
- # Author: GS
- # Description: Returns second item of a list.
- #
- # Parameters: None
- # Returns: second item of a list
- #=======================================================================
- Calls:
- Is called by: GetGestaltValue(),
-
-
- Task: GetGestaltValue(pAnswer)
- Library: Gestalt.Lib
- Header:
- ##################################################################################
- # GetGestaltValue()
- #=======================================================================
- # Author: GS
- # Description: Checks a 2 element list, If 2nd element type list,
- # call LowWordOfAnswer, otherwise return the element.
- #
- # Parameters: pAnswer - 2 element list returned from VU's built-in
- # gestalt task
- # Returns: integer
- #=======================================================================
- Calls:
- Is called by: Check32Bit(), CheckVM(), GestaltFPUType(), GestaltMachineType(),
- GestaltMMUType(), GestaltSystemArchitecture()
-
-
- Task: GestaltLongError(gestaltAnswer := {0,{0,0}})
- Library: Gestalt.Lib
- Header:
- ##################################################################################
- # GestaltLongError()
- #=======================================================================
- # Author: GS
- # Description: Will return a longer error response in the form of a string.
- #
- # Parameters: None
- # Returns: String with error text
- #=======================================================================
- Calls:
- Is called by: GestaltFPUType(), GestaltMachineType(), GestaltProcessorType(),
- GestaltMMUType(), GestaltLogicalRAMSize(), GestaltPhysicalRAMSize()
-
-
- Task: GestaltFPUType()
- Library: Gestalt.Lib
- Header:
- ##################################################################################
- # GestaltFPUType()
- #=======================================================================
- # Author: Derived from Virtual User 2.0 Example libraries
- # Description: Returns FPU type.
- #
- # Parameters: None
- # Returns: NoFPU
- # 68881
- # 68882
- # 68040
- # unknFPU
- #=======================================================================
- Calls:
- Is called by: PreFlight(), MachineState()
-
-
- Task: GestaltMachineType(ReturnMachineName := 0)
- Library: Gestalt.Lib
- Header:
- ##################################################################################
- # GestaltMachineType()
- #=======================================================================
- # Author: Derived from Virtual User 2.0 Example libraries
- # Description: Checks machine being tested and returns string with Machine Type.
- #
- # Parameters: 0 - return machine number
- # 1 - return machine name
- # Returns: String with Machine Name or integer with machine number
- # (See list below)
- #=======================================================================
- Calls: GetGestaltValue(), GestaltLongError()
- Is called by: MachineState()
-
-
- Task: GestaltProcessorType()
- Library: Gestalt.Lib
- Header:
- ##################################################################################
- # GestaltProcessorType()
- #=======================================================================
- # Author: Derived from Virtual User 2.0 Example libraries
- # Description: Returns the processor running on the test machine
- #
- # Parameters: None
- # Returns: 68000
- # 68010
- # 68020
- # 68030
- # 68040
- #=======================================================================
- Calls: _Gestalt(), GestaltLongError()
- Is called by: PreFlight(), MachineState(), CheckCache()
-
-
- Task: GestaltMMUType()
- Library: Gestalt.Lib
- Header:
- ##################################################################################
- # GestaltMMUType()
- #=======================================================================
- # Author: Derived from Virtual User 2.0 Example libraries
- # Description: Will return the memory management unit type found operating on the target.
- #
- #
- # Parameters: None
- # Returns: NoMMU
- # AMU
- # 68851
- # 68030MMU
- # 68040MMU
- # unknMMUType
- #=======================================================================
- Calls: _Gestalt, GetGestaltValue(), GestaltLongError()
- Is called by: MachineState()
-
-
- Task: GestaltLogicalRAMSize()
- Library: Gestalt.Lib
- Header:
- ##################################################################################
- # GestaltLogicalRAMSize()
- #=======================================================================
- # Author: Derived from Virtual User 2.0 Example libraries
- # Description: Will return the amount of logical RAM located in a machine.
- # (VM+RM)
- #
- #
- # Parameters: None
- # Returns: an integer in megabytes.
- #=======================================================================
- Calls: _Gestalt(), GestaltLongError()
- Is called by:
-
-
- Task: GestaltPhysicalRAMSize()
- Library: Gestalt.Lib
- Header:
- ##################################################################################
- # GestaltPhysicalRAMSize()
- #=======================================================================
- # Author: Derived from Virtual User 2.0 Example libraries
- # Description: Will return the amount of physical RAM located in a machine.
- #
- #
- # Parameters: None
- # Returns: an integer in megabytes.
- #=======================================================================
- Calls: _Gestalt(), GestaltLongError()
- Is called by:
-
-
- Task: GestaltSystemArchitecture()
- Library: Gestalt.Lib
- Header:
- #########################################################################
- # GestaltSystemArchitecture()
- #=======================================================================
- # Author: KTA
- # Description: Makes a Gestalt call with selector of 'sysa' to determine if the
- # target system is 68K or PowerPC
- # Parameters: none
- # Returns: 0 - Selector not installed (older 68k)
- # 1 - Selector installed - target is 68k based not PowerPC
- # 2 - Selector installed - target is PowerPC based not 68k
- #=======================================================================
- Calls: _Gestalt, GetGestaltValue()
- Is called by: IsPowerPC()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: Globals.Lib
- Calls: "Custom.Lib", "ExceptionHandling.Lib", "Output.Lib", "CrashHandling.Lib"
-
-
-
- Task: InitGlobals(pTheScriptParam := -1, pGlobalsDefList := undefined)
- Library: Globals.Lib
- Header:
- #########################################################################
- # InitGlobals()
- #========================================================================
- # Author: KTA
- # Description: Initializes most global variables used by the SPEC S&L.
- # This Task should be called prior to making any calls to
- # any tasks contained within the SPEC S&L Libraries
- # Please refer to 'The Hitchhikers Guide' for more information
- # concerning any individual global.
- # Parameters: pTheScriptParam - (list or integer)
- # - list - contains both parameters to SetTestLevel()
- # - integer - only first parameter to SetTestLevel()
- # (see SetTestLevel() header for more details)
- #
- # pGlobalsDefList - list of lists with each inner list containing a
- # label (string - name of the global) and a value for the global.
- # This enables the user to define globals through VU's
- # interface for individual scripts without having to
- # modify any SPEC S&L files (i.e. Custom.Lib)
- #
- # By providing a definition for a global, you will only
- # effect that specific global, all other globals are
- # given default values.
- #
- # The globals which can be defined are as follows:
- # 1) gCommandExceptions 2) gExceptionHandlerList
- # 3) gCrashHandling 4) gAppVerify
- # 5) gTestCaseLoggingMethod 6) gDebugFlag
- # 7) gTextStr 8) kScrapTEXT
- # 9) kScrapPICT 10) gScrapTitle
- # 11) gAliasDirectory 12) gTCTracking
- # 13) gPreFlight 14) gFontList
- # 15) gFontSizeList 16) gFontStyleList
- # 17) gSFPUTLocation 18) gPrintTest
- # 19) gDoWindowList 20) gBackgroundQuit
- # 21) gForceQuit 22) gSeedValue
- # 23) gMacroCommands 24) gAdditionalTargetInfo
- # 25) gSpecialErrorHandlers 26) gPrintSuiteInfo
- # 27) gLaunchReqs
- # Returns: Nothing
- # Examples: InitGlobals({2, {{'DrawLevel', 1}}}, {{'gSeedValue', 1542}, {'gCrashHandling', false}});
- # Assumptions:
- #========================================================================
- Calls: SetTestLevel(), InitCustom(), logstr(), gInitGlobalsThreadingHook, InitRandomSeed()
- Is called by: SuiteStart()
-
-
- Task: InitRandomSeed()
- Library: Globals.Lib
- Header:
- #########################################################################
- # InitRandomSeed()
- #========================================================================
- # Author: ML
- # Description: Initializes the random seed.
- # Parameters: None
- # Returns: Nada
- # Examples: InitRandomSeed();
- # Assumptions:
- #========================================================================
- Calls: LogStr()
- Is called by:
-
-
- Task: SetTestLevel(pTestLevel := 1, pCustomSetting := {})
- Library: Globals.Lib
- Header:
- #########################################################################
- # SetTestLevel(pTestLevel := 1, pCustomSetting := {})
- #========================================================================
- # Author: KTA
- # Description: Will set globals that will determine the level of testing
- # that will occur in the DoTests.
- # Parameters: pTestLevel := Generic level of testing desired.
- # 1 - least amount of testing
- # 2 - medium amount of testing
- # 3 - Most amount of testing
- # pCustomSetting - Any Custom settings, this will override the
- # generic settings for any specified global setting.
- # Returns:
- # Examples: SetTestLevel( 1, {{'DrawLevel', {1,2}}} );
- # Assumptions: Note : the labels used to set individual methods are as follows:
- # 1) DrawLevel
- # 2) FontLevel
- # 3) WindowLevel
- # 4) AppTestLevel
- #========================================================================
- Calls: LogStr()
- Is called by: InitGlobals()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: IvyOperations.Lib
- Calls: "Ivy Tool Declaration.vulib", "Ivy.vuLib", "Output.Lib",
- "String.Lib", "ExceptionHandling.Lib";
-
-
- Task: _Ivy(pServiceOrTask, pParamList := {}, pOnTarget := true, pIsRetry := 0)
- Library: IvyOperations.Lib
- Header:
- #########################################################################
- # _Ivy(pOnTheTarget := true)
- #========================================================================
- # Author: KTA
- # Description: Does the exception handling for the Ivy. All high level tasks
- # should call this routine for file tool services. Handles initialization
- # of tool automatically.
- # Parameters: pServiceOrTask - Name of the Service
- # pParamList - List of parameters
- # pOnTarget - Flag to indicate whether the service should be performed
- # the host or the target. 1 = target/0 = host.
- # Returns: Whatever the file tool returns
- # Examples: _Ivy('LocateImage', {'fileName'},1);
- # Assumptions: None
- #========================================================================
- Calls: Ivy(), ExceptionDispatcher(), _Ivy()
- Is called by: _Ivy(), InitIvy(), QuitIvy(), RemoveIVTimingMethod(), StartTimerIV(),
- StopTimerIV(), LocateTheString(), TimeCutPaste(), TimeSaveAs(),
- TimeOpenFile(), TimeScrolling()
-
-
- Task: InitIvy(pOnTheTarget := true)
- Library: IvyOperations.Lib
- Header:
- #########################################################################
- # InitIvy(pOnTheTarget := true)
- #========================================================================
- # Author: KTA
- # Description: Initializes the Ivy
- # Parameters: pOnTheTarget - True if you want to launch the Ivy on
- # the target machine. False if on the Host.
- # Returns: 0 - Couldn't initialize
- # 1 - Init On Target
- # 2 - Init On Host
- # Examples: InitIvy();
- # Assumptions: None
- #========================================================================
- Calls: _Ivy(),
- Is called by: TimeCutPaste(), TimeSaveAs(), TimeOpenFile(), TimeScrolling()
-
-
- Task: QuitIvy(pOnTheTarget := true)
- Library: IvyOperations.Lib
- Header:
- #########################################################################
- # QuitIvy()
- #========================================================================
- # Author: KTA
- # Description: Quits Ivy
- # Parameters: none
- # Returns: 0 - Couldn't Quit
- # 1 - Quit Successfully
- # Examples: QuitIvy();
- # Assumptions: None
- #========================================================================
- Calls: _Ivy()
- Is called by: TimeCutPaste(), TimeSaveAs(), TimeOpenFile(), TimeScrolling()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: LaunchQuit.Lib
- Calls: "TCS.Lib" , "Output.Lib", "String.Lib", "Gestalt.Lib", "StandardFile.Lib",
- "OnTarget.Lib", "TargetCheck.Lib","UserInterface.Lib", "OnTargetOperations.Lib",
- "ExceptionHandling.Lib"
-
-
-
- Task: Twitcher(appName := "")
- Library: LaunchQuit.Lib
- Header:
- #########################################################################
- # Twitcher(appName)
- #========================================================================
- # Author: DM
- # Description: This Task is intended to select apps from the Process List
- # menu in System 7.0. Use LaunchTwitch to handle launching
- # or twitching applications.
- # This routine selects apps from the Process List.
- # Parameters: appName - app to twitch to.
- # Returns: 0 if twitching to appName fails
- # TheCurrentApp - if twitching was successful
- # Examples: Twitcher("MacWrite 5.0");
- # Assumptions: None
- #========================================================================
- Calls: ExceptionDispatcher(), _match(), isSubString(), _matchBoolean()
- TCSStart(), _select(), LogStr(), MatchApplication(), TCSEnd()
- Is called by: Quit(), TwitchQuit(), LaunchTwitch()
-
-
- Task: MiniLaunch(appTitle, LaunchApp := 1,SetDir := 1)
- Library: LaunchQuit.Lib
- Header:
- #########################################################################
- # MiniLaunch(appTitle, LaunchApp, SetDir)
- #========================================================================
- # Author: NJV - DMM
- # Description: This routine will launch an application on the target
- # machine(s). The miniLauncher tool should be the running
- # application on the target machine(s). This routine will
- # type the input parameter appTitle to the target machine
- # and then type the return key (which is how an application
- # is launched using miniLauncher.) The application to be
- # launched must reside in a folder beneath the miniLauncher
- # tool in the directory hierarchy. For more information on
- # the miniLauncher tool, see the read-me that accompanies
- # the tool.
- # MiniLauncher can also open or print documents. See the
- # LaunchApp parameter description below for more details.
- #
- # Parameters: appTitle - title of the application or document to be launched.
- # The title does not have to be complete. The MiniLauncher
- # tool will launch the first application it finds
- # starting with the string appTitle. If LaunchApp
- # parameter is not 1, then appTitle will hold the
- # document name to be opened or printed.
- # LaunchApp - 1 to launch application
- # 0 to launch application via a document
- # -1 to print a document (launch app and print)
- # SetDir - 1 to set the default directory to that of the
- # application
- # 0 to bypass setting of default directory (will
- # end up being MiniLauncher's directory).
- #
- # Returns: 1 - Launched OK
- # 0 - Couldn't launch application (usually due to lack of
- # enough memory on the target machine).
- #
- # Examples: MiniLaunch('Word');
- #========================================================================
- Calls: _matchBoolean(), _match(), _select(), LogStr(), SelectRadioButton(),
- SelectButton(), TypeStr(), SpecialKey(), DialogCheck(), MatchApplication()
- Is called by: LaunchTwitch()
-
-
- Task: Quit(pOverWrite :=1, pDocName:="", pHowQuit :=1, pCloseScrapbook:=1,
- pCloseFinderWindows:=1,pRecursionFlag := 1)
- Library: LaunchQuit.Lib
- Header:
- #########################################################################
- # Quit(pOverWrite, pDocName)
- #=======================================================================
- # Author: KTA
- # Description: Will turn off the Application Verification scheme, Select
- # the Quit menu item, check whether or not to save changes,
- # then reset the App verification scheme to its previous state.
- # Parameters: pOverWrite 1 - Save changes.
- # 0 - Don't save changes.
- # pDocName - The string that will be used to save the document
- # pHowQuit 1 - Select "Quit" from File Menu
- # 2 - Type Cmd-Q to quit
- # {list} - ord or string path to Quit menuitem, i.e.
- # {"Quit", "File"} or {17, 2}
- # pCloseScrapbook 1 - close the scrapbook after quitting
- # 0 - don't close the scrapbook after quitting
- # pCloseFinderWindows 1 - close finder windows after quitting
- # 0 - don't close finder windows after quitting
- # pRecursionFlag 0 - Don't call Quit recurively if unable to quit.
- # 1 - Call Quit recurively if unable to quit.
- # Returns: -2 - All quitting bypassed (gForceQuit enabled)
- # -1 - Closed all windows of current app (gBackgroundQuit enabled)
- # 0 - Unable to quit current app
- # 1 - successfully quit current app
- #=======================================================================
- Calls: MatchApplication(), logstr(), CloseAllWindows(), TCSStart(), keyEq(),
- SelectMenuItem(), checkYesNo(), _matchBoolean(), SaveAs(), Twitcher(),
- DialogHandler(), Quit(), TCSEnd(), closeWindow(),
- Is called by: DoCloseApp(), Quit(), TwitchQuit()
-
-
- Task: QuitBackgroundApps()
- Library: LaunchQuit.Lib
- Header:
- #########################################################################
- # QuitBackgroundApps()
- #========================================================================
- # Author: ML
- # Description: Checks for Background Quit Dialog, then
- # chooses "quit apps" if BackgroundQuit is ON or
- # "Cancel" if it's OFF.
- # Parameters: None
- # Returns: -2 Couldn't dismiss BG Quit dialog
- # -1 BG Quit dialog present, "Cancel" button selected
- # 0 BG Quit dialog not present
- # 1 BG Quit dialog present, "Quit apps" button selected
- # Assumptions: 7.x
- #========================================================================
- Calls: _matchBoolean(), ExceptionDispatcher(), logstr(), TCSStart(), SpecialKey(),
- selectbutton(), TCSEnd()
- Is called by: LaunchAssist()
-
-
- Task: TwitchQuit()
- Library: LaunchQuit.Lib
- Header:
- #########################################################################
- # TwitchQuit()
- #========================================================================
- # Author: ML
- # Description: Selects the fifth item (first app or da) in the process list, or sixth
- # if the fifth is "Finder", and quits it.
- # Parameters: None
- # Returns: 0 - Could not quit an app or da
- # 1 - quit app or da ok
- # Assumptions: 7.0x - There is a process list
- #========================================================================
- Calls: Twitcher(), logstr(), ExceptionDispatcher(), Quit()
- Is called by: LaunchAssist()
-
-
- Task: LaunchAssist(pAppName := '')
- Library: LaunchQuit.Lib
- Header:
- #########################################################################
- # LaunchAssist(pAppName)
- #========================================================================
- # Author: ML
- # Description: Assist launch process by background quitting, checking
- # for "not enough memory" dialogs, and twitch and quitting.
- # Parameters: pAppName - name of the application to be launched.
- # Returns: -3 - unsuccessful- not enough memory
- # -2 - unsuccessful - background quit cancelled
- # -1 - unsuccessful - twitchquit failed
- # 0 - unsuccessful - alias not found
- # 1 - successful launch
- # 2 - successful twitchquit
- # Assumptions: 7.0x - There is a process list
- #========================================================================
- Calls: _matchBoolean(), DialogCheck(), QuitBackgroundApps(), TwitchQuit()
- Is called by: LaunchByAppleMenu(), LaunchByTypeSelect()
-
-
- Task: LaunchByAppleMenu(ItemName)
- Library: LaunchQuit.Lib
- Header:
- #########################################################################
- # LaunchByAppleMenu()
- #========================================================================
- # Author: ML
- # Description: Launch via the Apple Menu
- # Parameters: ItemName - name of app or DA to launch
- # Returns: -3 - unsuccessful- not enough memory
- # -2 - unsuccessful - background quit cancelled
- # -1 - unsuccessful - twitchquit failed
- # 0 - unsuccessful - alias not found
- # 1 - successful launch
- # Assumptions: 7.0x - There is a process list
- # ItemName is in apple menu
- #========================================================================
- Calls: TCSStart(), Selectmenuitem(), LaunchAssist(), TCSEnd(),
- Is called by: LaunchByTypeSelect(), LaunchTwitch()
-
-
- Task: LaunchByTypeSelect(AppName, AliasDir := "")
- Library: LaunchQuit.Lib
- Header:
- #########################################################################
- # LaunchByTypeSelect()
- #========================================================================
- # Author: ML
- # Description: Launch via type select
- # Parameters: AppName - name of app or DA to launch
- # AliasDir - name of alias directory
- # Returns: -3 - unsuccessful- not enough memory
- # -2 - unsuccessful - background quit cancelled
- # -1 - unsuccessful - twitchquit failed
- # 0 - unsuccessful - other
- # 1 - successful launch
- # Assumptions: 7.0x - There is a process list
- #========================================================================
- Calls: _matchBoolean(), LaunchByAppleMenu(), TCSStart(), typeStr(),
- VerifyAppPriorToLaunch(), TCSEnd(), KeyEq(), LaunchAssist(),
- isSubString(), logstr()
- Is called by: LaunchTwitch()
-
-
- Task: LaunchFillMemApp()
- Library: LaunchQuit.Lib
- Header:
- #########################################################################
- # LaunchFillMemApp()
- #========================================================================
- # Author: ML
- # Description: Launch global gfillMemApp
- # Parameters: None
- # Returns: none
- # Assumptions: 7.0x - There is a process list
- # Alias or original of gFillMemApp is in apple menu
- # or in alias directory. Memory allocation of gFillMemApp
- # has been set high enough to fill up remaining memory.
- #========================================================================
- Calls: LaunchTwitch()
- Is called by: LaunchTwitch()
-
-
- Task: LaunchTwitch(AppName, AliasDir:= global gAliasDirectory,
- LaunchApp := 1, SuiteBailOut:=1)
- Library: LaunchQuit.Lib
- Header:
- #########################################################################
- # LaunchTwitch(AppName, AliasDir, LaunchApp, SuiteBailOut)
- #========================================================================
- # Author: KTA
- # Description: This routine determines whether the Operating system is
- # 6.0x or 7.0x and launches the application accordingly.
- # 6.0x - Will check the Apple menu to see if the App is
- # currently running and select it if it is. If it is not running
- # it will select Mini from the Apple menu and call MiniLaunch(AppName);
- # 7.0x - Will check the ProcessList to see if the App is
- # currently running and select it if it is. if it is not it will
- # Select the Apple from the Apple Menu, or the <AliasDir> and then type
- # the <AppName> and select the Open menuItem.
- # Parameters: AppName - Application to be launched/Twitched
- # AliasDir - Folder in the Apple menu that contains <AppName>.
- # LaunchApp - 0 Select from Process list - Do not launch the App.
- # 1 Select from Process list or launch the App if
- # necessary.
- # SuiteBailOut - 1 Call ExceptionDispatcher(-70) to bail out of suite if
- # LaunchTwitch fails
- # 0 Don't call ExceptionDispatcher(-70) to bail out of suite if
- # LaunchTwitch fails
- # Returns: 0 - App did not launch
- # AppName - Name of app that launched
- # Examples: LaunchTwitch('MacWrite', "#CoreAliases");
- # LaunchTwitch('MacWrite Doc',"#CoreAliases",0);
- # Assumptions: 7.0x - That the Application (or Alias) is resident in the
- # Apple Menu or the <AliasDir> which contains <AppName> is.
- #========================================================================
- Calls: gScriptBeginCriticalHook, TCSStart(), gLaunchTwitchHook1, PreFlight(),
- TCSEnd(), _matchBoolean(), gLaunchTwitchHook2, gPatchLaunchTwitch,
- Twitcher(), _match(), LaunchByAppleMenu(), gLaunchTwitchHook3,
- LaunchByTypeSelect(), Minilaunch(), MatchApplication(), DialogCheck(),
- LaunchFillMemApp(), logstr(), gLaunchTwitchHook4, gScriptEndCriticalHook
- Is called by: Scrapbook(), FinderNavigate(), ShimmerMateCopy(), LaunchFillMemApp(),
-
-
-
- Task: PreFlight(myList)
- Library: LaunchQuit.Lib
- Header:
- #########################################################################
- # PreFlight(List) - Called by LaunchTwitch, Set global
- # gLaunchReqs to parameter list.
- #========================================================================
- # Author: GS
- #
- # Description: This routine will test whether or not your script will run on the
- # targets hardware and software configuration. PreFlight will test
- # the machine for each selectors specified and return a fail if any
- # of the selectors fail.
- #
- # Parameters: 'fpu' Returns a fail on machines that do not have an fpu.
- # 'color' Returns a fail on machines that are not set to color.
- # '8bd' Returns a fail on machines that are not set to at least 8bit depth.
- # 'no68000' Returns a fail on 68000 machines (support 'no68k' for compatibility reasons).
- # 'noCache' Returns a fail on '040's that have caching turned on.
- # 'no32' Returns a fail on cpu's with 32 bit addressing turned on
- # '68kArch' Returns a fail on cpu's that are not 68k based
- # 'PowerPCArch' Returns a fail on cpu's that are not PowerPC based
- #
- # Returns: fail: {0, 'Error Message'}
- # pass: {1, ''}
- #
- # Examples: gLaunchReqs = {'fpu', 'color', '8bd', 'no68K', 'noCache'};
- #
- #========================================================================
- Calls: GestaltFPUType(), IsPowerPC(), ExceptionDispatcher(), GestaltProcessorType(),
- OnTargetInit(), _OnTarget(), Check32Bit()
- Is called by: LaunchTwitch()
-
-
- Task: VerifyAppPriorToLaunch(pTheExpectedApp := '')
- Library: LaunchQuit.Lib
- Header:
- #########################################################################
- # VerifyAppPriorToLaunch(pTheExpectedApp)
- #=======================================================================
- # Author: KTA
- # Description: Verifies that the title of the GetInfoWindow contains
- # the string <pTheExpectedApp>.
- # Parameters: pTheExpectedApp := Name of the App to verify
- # Returns: 0 := String was not contained in GetInfoWindow
- # 1 := String was contained in GetInfoWindow
- #=======================================================================
- Calls: KeyEq(), _matchBoolean(), ExceptionDispatcher(), IsSubString()
- Is called by: LaunchByTypeSelect()
-
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: MemoryMonitorOperations.lib
- Calls: "MemoryMonitor.vulib","ExceptionHandling.Lib"
-
-
- Task: _MemoryMonitor(pServiceOrTask, pParamList := {}, pOnTarget := true, pIsRetry := 0)
- Library: MemoryMonitorOperations.lib
- Header:
- #########################################################################
- # _MemoryMonitor(pServiceOrTask, pParamList, pOnTarget, pIsRetry)
- #========================================================================
- # Author: KTA
- # Description: Does the exception handling for the MemoryMonitor. All high level tasks
- # should call this routine for MemoryMonitor tool services.
- # Handles initialization of tool automatically.
- # Parameters: pServiceOrTask - Name of the Service
- # pParamList - List of parameters
- # pOnTarget - Flag to indicate whether the service should be performed
- # the host or the target. 1 = target/0 = host.
- # Returns: What ever the MemoryMonitor returns - list of three elements
- # { errCode, Data, [error message]}
- # Examples: _MemoryMonitor('GetProcess', {'SystemZone'},1);
- # Assumptions: None
- #========================================================================
- Calls: MemoryMonitor(), ExceptionDispatcher(), _MemoryMonitor(),
- Is called by: InstallEveryTimeMacro(), _MemoryMonitor(), MemoryMonitorInit(),
- MemoryMonitorQuit(), RecordGetAboutThisMacintosh(),
- ProfileApplication(), GetROMBuild()
-
-
- Task: MemoryMonitorInit(pOnTarget := True)
- Library: MemoryMonitorOperations.lib
- Header:
- #########################################################################
- # MemoryMonitorInit(pOnTarget)
- #========================================================================
- # Author: KTA
- # Description: Makes a call to initialize MemoryMonitor. Defalut is to
- # initalize it on the Target.
- # Parameters: pOnTarget - True means Memory Monitor will be initialized
- # on the Target.
- # - False means Memory Monitor will be initialized
- # on the Host.
- # Returns: 1 - initialization was successful.
- # 0 - initialization failed
- # Examples: MemoryMonitorInit();
- # Assumptions:
- #========================================================================
- Calls: _MemoryMonitor()
- Is called by: InstallEveryTimeMacro()
-
-
- Task: MemoryMonitorQuit()
- Library: MemoryMonitorOperations.lib
- Header:
- #########################################################################
- # MemoryMonitorQuit()
- #========================================================================
- # Author: KTA
- # Description: Makes a call to quit MemoryMonitor.
- # Parameters: none
- # Returns: 1 - quitting was successful.
- # 0 - quitting failed
- # Examples: MemoryMonitorQuit();
- # Assumptions:
- #========================================================================
- Calls: _MemoryMonitor()
- Is called by: InstallEveryTimeMacro()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: Misc.Lib
- Calls: "OutPut.Lib","LaunchQuit.Lib","TCS.Lib","UserInterface.Lib", "Geometry.Lib";
-
-
- Task: CenterofRectClick(pSpecifier := -1)
- Library: Misc.Lib
- Header:
- #########################################################################
- # CenterofRectClick(pSpecifier)
- #=======================================================================
- # Author: KTA
- # Description: Clicks in the center of the input parameter <pSpecifier>
- # Parameters: pSpecifier
- # -1 - indicates the screen
- # integer <> -1 (or string) is a window specifier
- # list - should be valid rectangle
- # Returns: Nada
- #=======================================================================
- Calls: CenterPointOfRect(), findWindow(), LogStr()
- Is called by: AboutBox()
-
-
- Task: AboutBox(pDismissAboutBox := 0)
- Library: Misc.Lib
- Header:
- #########################################################################
- # AboutBox(pDismissAboutBox)
- #=======================================================================
- # Author: ML
- # Description: Test the About Box
- # Parameters: pDismissAboutBox - -1 Escape key
- # 0 Return key
- # integer > 0 Click in center of screen {integer} times
- # {string} select button named {string}
- # Returns: 0 - Something failed
- # 1 - Successfully selected and dismissed the about box.
- #=======================================================================
- Calls: TCSStart(), SelectMenuItem(), LogStr(), TCSEnd(), SpecialKey(),
- selectButton(), CenterofRectClick(), FindWindow(),
- Is called by: DoCloseApp()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: OnTargetOperations.Lib
- Calls: "OnTarget.Lib", "ExceptionHandling.Lib";
-
-
- Task: _OnTarget(pServiceOrTask, pParamList := {}, pOnTarget := true, pIsRetry := 0)
- Library: OnTargetOperations.Lib
- Header:
- #########################################################################
- # _OnTarget(pServiceOrTask, pParamList, pOnTarget, pIsRetry)
- #========================================================================
- # Author: KTA
- # Description: Does the exception handling for the OnTarget. All high level tasks
- # should call this routine for OnTarget tool services.
- # Handles initialization of tool automatically.
- # Parameters: pServiceOrTask - Name of the Service
- # pParamList - List of parameters
- # pOnTarget - Flag to indicate whether the service should be performed
- # the host or the target. 1 = target/0 = host.
- # Returns: What ever the OnTarget returns - list of three elements
- # { errCode, Data, [error message]}
- # Examples: _OnTarget('Initialize', {1});
- # Assumptions: None
- #========================================================================
- Calls: OnTarget(), ExceptionDispatcher(), _OnTarget(),
- Is called by: PreFlight(), _OnTarget(), OnTargetInit(), FileShare(),
- CheckCache()
-
-
- Task: OnTargetInit()
- Library: OnTargetOperations.Lib
- Header:
- #########################################################################
- # OnTargetInit()
- #========================================================================
- #
- # Author: GS
- #
- # Description: Initializes OnTarget
- # Parameters: None
- # Returns: 1 - if OnTarget launched and initialized
- # 0 - if OnTarget could not launch
- #
- # Examples: OnTargetInit()
- #
- #========================================================================
- Calls: _OnTarget()
- Is called by: PreFlight(), FileShare(), CheckCache()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: OutPut.Lib
- Calls:
-
-
- Task: LogStr(pTheString, pLogPriority := 5,pReportLibTask := 'RStatus')
- Library: OutPut.Lib
- Header:
- #########################################################################
- # LogStr(pTheString, pLogPriority,pReportLibTask)
- #========================================================================
- # Author: KTA
- # Description: Match the target and print it with whatever is passed
- # to it in the 'str' parameter. Set the appropriate
- # LogPriority based on the context of the string.
- # Parameters: pTheString - string to be printed
- # LogPriority - The priority of the string to be printed
- # 0 - No logging
- # 1 - Errors
- # 2 - Comments and Notes
- # 3 - Summary information
- # 4 - More detailed
- # 5 - Detailed description
- # Returns: Nothing
- # Examples: LogStr("It worked");
- # LogStr("It worked",3);
- # Assumptions: None
- #========================================================================
- Calls: gReportLibHooks, gLogStrHook2, gLogStrHook1,
- Is called by: <<EVERYBODY>>;
- CrashHandling.Lib, DA.Lib, DoTasks.Lib,
- Draw.Lib, FileToolOperations.Lib, Finder.Lib, Font.Lib,
- Globals.Lib, LaunchQuit.Lib, Misc.Lib, Palette.Lib,
- Print.Lib, Select.Lib, StandardFile.Lib, TargetCheck.Lib,
- TCS.Lib, TimingOperations.lib, UserInterface.Lib,
- WorldReady.Lib
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: Palette.Lib
- Calls: "TCS.Lib","Output.Lib","UserInterface.Lib", "ExceptionHandling.lib";
-
- Task: GetPalRect(palStruct)
- GetPalType(palStruct)
- GetPalMatrixSize(palStruct)
- GetPalOffsets(palStruct)
- InsertPalRect(rect, pS)
- InsertPalOnDesk(onDesk, pS)
- Library: Palette.Lib
- Header:
- #########################################################################
- # Palette Structure Accessors()
- #========================================================================
- # Author: DM
- # Description: These functions access the data in an palette data struct
- # Parameters: palStruct
- # Returns: the requested data element or list
- #========================================================================
- Calls:
- Is called by: CalcOffset(), SelFromDocWind(), SelFromPopUp(),
- SelFromMenuItemPopUp(), PalettePicker(), GetRandomElement()
-
-
- Task: GetElemNum(elemStruct)
- GetPalNum(elemStruct)
- GetElemName(elemStruct)
- GetElemType(elemStruct)
- GetElemDblClk(elemStruct)
-
- GetAttributes(elemStruct)
- GetSetAttribute(elemStruct)
- GetPatternFlag(elemStruct)
- GetLineFlag(elemStruct)
- GetColorFlag(elemStruct)
- GetGradientFlag(elemStruct)
- GetBackgroundColorFlag(elemStruct)
- GetTextColorFlag(elemStruct)
- GetPenPatternFlag(elemStruct)
-
- InsertElemNum(eNum, tS)
- InsertPalNum(pNum, tS)
- InsertElemName(eNam, tS)
- InsertElemType(eTyp, tS)
- InsertElemDblClk(eDbc, tS)
- InsertSetAttribute(eDbc, tS)
- Library: Palette.Lib
- Header:
- #########################################################################
- # Tool Structure Accessors()
- #========================================================================
- # Author: DM
- # Description: These functions access the data in an tool data struct
- # Parameters: elemStruct
- # Returns: the requested data element or list
- #========================================================================
- # History:
- # ML 11/10/95 Added support for gradients, background colors, text colors,
- # and pen patterns
- #########################################################################
- ## elemStruct is the data structure that completely specifies tools
- ## elemStruct {
- ## ElemNum
- ## PalNum
- ## ElemName
- ## ElemType - kClick := move-click
- ## (Pointlist is single set of points)
- ## - kDrag := move-pressmouse-move-releasMouse
- ## (Pointlist is two set of points)
- ## == Pointlist is defined by Global gNumPoints ==
- ## - kMultiDrag := move-pressmouse-move-move…releasMouse
- ## - kMultiClick:= move-click-move-click-move…
- ## - kMultiClickDragTool := move-pressmouse-move-releasMouse-pressmouse-move-releasMouse…
- ##
- ## elemDblClk - Flag to doulble click when finished
- ## - 0 := No DoubleClick
- ## - 1 := DoubleClick
- ##
- ## SetAttribute - Flag indicating when to set attributes
- ## - 0 := No attributes to set
- ## - 1 := Set attribute before drawing object
- ## - 2 := Set attribute after drawing object
- ## - "str" := Type <'Str'> after drawing object (texttool)
- ## }
- ## Defined ElemTypes:
- ##
- #########################################################################
- ## Example: global CharTool := { ElemNum, PalNum,"ElemName", ElemType, elemDblClk};
- ## global CharTool := { 17 , 1 ,"Char" , kClick , 0 };
- #########################################################################
- Calls:
- Is called by: << NOTE: each of the following tasks calls or defines
- a reference to 1 or more of the Tool Structure Accessor tasks.
- No task calls them all. >>
- DrawObject(), CheckObjectStruct(), CalcOffset(), SelFromDocWind(),
- SelFromPalWind(), SelFromCoord(), SelFromPopUp(),
- SelFromMenuItemPopUp(), PalettePicker(), SetPointList(),
- SetAttributes()
-
-
- Task: PalettePicker(elemStruct := {}, ObjectNumber := 0)
- Library: Palette.Lib
- Header:
- #########################################################################
- # PalettePicker(elemStruct)
- #========================================================================
- # Author: DM
- # Description: Dispatches selection request to palette handlers.
- # Parameters: elemStruct:= Structure containing element info
- # Only the first 3 elements are required.
- # kInWindPal := 1;
- # kIsWindPal := 2;
- # kPopUpPal := 4;
- #
- # Return Values: 1 - OK
- # 0 - error
- # Examples: PalettePicker(elemStruct);
- #========================================================================
- Calls: GetPalNum(), GetPalType(), SelFromCoord(), SelFromDocWind(),
- SelFromPalWind(), SelFromPopUp(), SelFromMenuItemPopUp(), LogStr()
- Is called by: DrawObject(), SetTool(), SetPaletteItem(), CheckSetup()
-
-
- Task: CalcOffset(elemStruct)
- Library: Palette.Lib
- Header:
- #########################################################################
- # CalcOffset(elemStruct)
- #========================================================================
- # Author: KTA
- # Description: Calculates tool offsets based on palette info.
- # Parameters: elemStruct:= structure containing element info
- # Return Values: toolOffset:= {x,y}
- # 0 - error
- # Examples: CalcOffset(elemStruct);
- #========================================================================
- Calls: GetPalNum(), GetPalType(), GetElemNum(), GetPalRect(), GetPalOffsets(),
- GetPalMatrixSize(), Findwindow(),
- Is called by: SelFromDocWind(), SelFromPalWind(), SelFromPopUp(),
- SelFromMenuItemPopUp()
-
-
- Task: SelFromDocWind(elemStruct, pObjectNumber)
- Library: Palette.Lib
- Header:
- #########################################################################
- # SelFromDocWind(elemStruct)
- #========================================================================
- # Author: DM
- # Description: Selects tools from palettes that are builtin to doc windows.
- # You can also specify a Rect in Global coordinates outside
- # the document window.
- # Parameters: elemStruct
- # pObjectNumber - Number to identify the elements required for
- # to draw the object.
- # Return Values: 1 - OK
- # 0 - error
- # Examples: SelFromDocWind(elemStruct);
- #========================================================================
- Calls: GetPalNum(), GetPalRect(), GetElemNum(), GetElemName(), LogStr(),
- TCSStart(), CalcOffset(), MoveMouse(), MoveRelativeToWindow(),
- TCSEnd()
- Is called by: PalettePicker(),
-
-
- Task: SelFromPalWind(elemStruct, pObjectNumber)
- Library: Palette.Lib
- Header:
- #########################################################################
- # SelFromPalWind(elemStruct)
- #========================================================================
- # Author: DM
- # Description: Selects tools from palettes that are windows.
- # Parameters: elemStruct:= structure containing element info
- # pObjectNumber - Number to identify the elements required for
- # to draw object.
- # Return Values: 1 - OK
- # 0 - error
- # Examples: SelFromPalWind(elemStruct);
- #========================================================================
- Calls: GetPalNum(), GetElemName(), GetElemNum(), LogStr(), TCSStart(),
- CalcOffset(), MoveMouse(), TCSEnd(),
- Is called by: PalettePicker()
-
-
- Task: SelFromCoord(elemStruct,ObjectNumber)
- Library: Palette.Lib
- Header:
- #########################################################################
- # SelFromCoord(elemStruct, ObjectNumber)
- #========================================================================
- # Author: KTA
- # Description: Selects tools from coodinates either global or relative to the
- # front window.
- # Parameters: elemStruct:= structure containing tool info
- # Return Values: Returns what is returned by MoveRelativeToWindow() or MoveMouse()
- # Examples: SelFromCoord(elemStruct);
- #========================================================================
- Calls: GetPalNum(), GetElemName(), GetElemNum(), LogStr(), TCSStart(),
- MoveRelativeToWindow(), MoveMouse(), TCSEnd()
- Is called by: PalettePicker()
-
-
- Task: SelFromPopUp(elemStruct, pObjectNumber)
- Library: Palette.Lib
- Header:
- #########################################################################
- # SelFromPopUp(elemStruct, pObjectNumber)
- #========================================================================
- # Author: DM
- # Description: Selects tools from palettes that pop up.
- # Parameters: elemStruct:= structure containing element info
- # pObjectNumber - Number to identify the elements required for
- # to draw the object.
- # Return Values: 1 - OK
- # 0 - error
- # Examples: SelFromPopUp(elemStruct);
- #========================================================================
- Calls: GetPalNum(), GetPalRect(), GetElemNum(), GetElemName(), LogStr(),
- TCSStart(), CalcOffset(), MoveMouse(), MoveRelativeToWindow(),
- _PressMouse(), MoveMouse(), gSelFromPopUpHook, _ReleaseMouse(), TCSEnd()
- Is called by: PalettePicker()
-
-
- Task: SelFromMenuItemPopUp(elemStruct, pObjectNumber)
- Library: Palette.Lib
- Header:
- #########################################################################
- # SelFromMenuItemPopUp(elemStruct)
- #========================================================================
- # Author: KTA
- # Description: Selects tools from palettes that pop up when selecting a
- # menuItem.
- # Parameters: elemStruct:= structure containing element info
- # pObjectNumber - Number to identify the elements required for
- # to draw the object.
- # Return Values: 1 - OK
- # 0 - error
- # Examples: SelFromMenuItemPopUp(elemStruct);
- #========================================================================
- Calls: GetPalNum(), GetPalRect(), GetElemNum(), GetElemName(), LogStr(),
- TCSStart(), CalcOffset(), MoveMouse(), MoveRelativeToWindow(),
- _PressMouse(), gSelFromMenuItemPopUpHook, _ReleaseMouse(), TCSEnd()
- Is called by: PalettePicker()
-
-
- Task: GetRandomElement(palStruct)
- Library: Palette.Lib
- Header:
- #########################################################################
- # GetRandomElement()
- #========================================================================
- # Author: DM
- # Description:
- # Parameters: palStruct
- # Returns:
- #========================================================================
- Calls:
- Is called by: SetPaletteItem()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: Print.Lib
- Calls: "Output.Lib","TCS.Lib","UserInterface.Lib", "ExceptionHandling.Lib";
-
-
-
- Task: TestPageSetup(checkBoxTest := 1,paperSizeTest := 1,
- pageSizeTest := 1,orientationTest := 1,printTest := 0)
- Library: Print.Lib
- Header:
- #########################################################################
- # TestPageSetup(checkBoxTest,paperSizeTest,pageSizeTest,orientationTest,printTest)
- #========================================================================
- # Author: EH
- # Description: Tests the standard page setup. All permutations of
- # checkboxes, paper radio buttons, scale controls, and
- # orientation icons are selected.
- # Parameters: checkBoxTest - 0 = do not test checkboxes
- # 1 = test check boxes
- # paperSizeTest - 0 = do not test paper sizes
- # 1 = test paper sizes
- # pageSizeTest - 0 = do not test page sizes
- # 1 = test page sizes
- # orientationTest - 0 = do not test orientation
- # 1 = test orientation
- # printTest - 0 = do not print after each combination
- # 1 = perform print test after each combination
- # Returns: 0 = Error occured in testing
- # 1 = Successful test
- # Examples: TestPageSetup(1,0,0,1,0);
- # Assumptions: A Page Setup dialog is up.
- #========================================================================
- Calls: _matchBoolean(), LogStr(), TestCheckBoxList(), SelectButton()
- Is called by:
-
-
- Task: TestCheckBoxList(checkBoxList)
- Library: Print.Lib
- Header:
- #########################################################################
- # TestCheckBoxList(printerParameters)
- #========================================================================
- # Author: EH
- # Description: Selects all possible combinations of check boxes by
- # recursive calls to itself. After each combination, it
- # calls PaperSize() which will result in all possible
- # combinations of check boxes, paper sizes, page sizes, and
- # orientations.
- # Parameters: checkBoxList - A list of check box names
- # Returns: Nothing
- #========================================================================
- Calls: PaperSize(), TestCheckBoxList(), SelectCheckBox()
- Is called by: TestPageSetup(), TestCheckBoxList()
-
-
- Task: PaperSize()
- Library: Print.Lib
- Header:
- #########################################################################
- # PaperSize()
- #========================================================================
- # Author: EH
- # Description: Selects all the paper size radio buttons. After selecting
- # each button, it calls PageSize() to go through all possible
- # page sizes and then orientations. This exercises all
- # possible combinations of paper size, page size, and
- # orientation.
- # Parameters: None
- # Returns: Nothing
- #========================================================================
- Calls: SelectRadioButton(), PageSize()
- Is called by: TestCheckBoxList()
-
-
- Task: PageSize()
- Library: Print.Lib
- Header:
- #########################################################################
- # PageSize()
- #========================================================================
- # Author: EH
- # Description: Selects the paper size in one of either three ways: Typing
- # values in a text edit field, selecting an up and down
- # control, or by selecting radio buttons. In between each
- # page size, this function calls ToggleOrientation.
- # Parameters: None
- # Returns: Nothing
- #========================================================================
- Calls: _type(), TypeStr(), ToggleOrientation(), MoveRelativeToWindow(), LogStr(),
- SelectRadioButton(),
- Is called by: PaperSize()
-
-
- Task: ToggleOrientation()
- Library: Print.Lib
- Header:
- #########################################################################
- # ToggleOrientation()
- #========================================================================
- # Author: EH
- # Description: Toggles the portrait and landscape icons.
- # Parameters: None
- # Returns: Nothing
- # Examples: ToggleOrientation();
- #========================================================================
- Calls: MoveRelativeToWindow(), LogStr(), PrintSample(),
- Is called by: PageSize()
-
-
- Task: PrintSample()
- Library: Print.Lib
- Header:
- #########################################################################
- # PrintSample()
- #========================================================================
- # Author: EH
- # Description: Prints the current document and then reopens the pagesetup
- # dialog.
- # Parameters: None
- # Returns: Nothing
- # Examples: PrintSample();
- #========================================================================
- Calls: SelectButton(), _match(), SelectMenuItem(), SpecialKey(), LogStr(),
- _matchBoolean(),
- Is called by: ToggleOrientation()
-
-
- Task: PrintAlert()
- Library: Print.Lib
- Header:
- #########################################################################
- # PrintAlert()
- #========================================================================
- # Author: EH
- # Description: Logs the Static text from an alert dialog.
- # Parameters: none
- # Return Values: none
- # Examples: PrintAlert();
- #========================================================================
- Calls: _collect, LogStr()
- Is called by:
-
-
- Task: PageSetup(WhichDevice := "LaserWriter", PagSetupMI := {"Page Setup", "File"})
- Library: Print.Lib
- Header:
- ########################################################################
- # PageSetup( WhichDevice )
- #=======================================================================
- # Author: KTA
- # Description: For PageSetup routines
- # Parameters: WhichDevice - device
- # PagSetupMI - pageSetup menuItem descriptor
- # Returns: None
- #=======================================================================
- Calls: _Match(), TCSStart(), SelectMenuItem(), TCSEnd(), SpecialKey(),
- FindWindow()
- Is called by: DoCloseApp()
-
-
- Task: Printer(PrintMI := {"Print", "File"})
- Library: Print.Lib
- Header:
- ########################################################################
- # Printer()
- #=======================================================================
- # Author: KTA
- # Description: For Print routines
- # Parameters: PrintMI - menuItem descriptor
- # Returns: None
- #=======================================================================
- Calls: TCSStart(), SelectMenuItem(), _match(), gPrinterHook, SpecialKey(),
- FindWindow(), TCSEnd()
- Is called by: DoCloseApp()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: Select.Lib
- Calls: "UserInterface.Lib", "Output.Lib", "Geometry.Lib", "ExceptionHandling.Lib";
-
-
-
- Task: SelectIt(ProcID,PtorRect)
- Library: Select.Lib
- Header:
- #########################################################################
- # SelectIt(ProcID,PtorRect)
- #========================================================================
- # Author: SMQ
- #
- # Description: This routine performs multiple selection tests :
- #
- # #1 Selects a point.
- # #2 Selects everything within a rectangle.
- # #3 Selects everything from the current position to the
- # top of the file.
- # #4 Selects everything from the current position to the
- # bottom of the file.
- # #5 Selects the entire file, i.e. everything from the
- # top of the file to the bottom.
- #
- # Parameters: ProcID - holds the procedure number
- # PtorRect - holds Pt or Rect coordinates
- #
- # Returns: 0 - encountered an input error. ProcID not one of the choices or
- # format of the PtorRect has an incorrect number of elements.
- #
- # Examples: SelectIt(3,PtorRect)
- #
- # Assumptions: Ruler is not shown
- #========================================================================
- Calls: PointSelect(), RectSelect(), HereToStartSelect(), HereToEndSelect(),
- SelectAll()
- Is called by:
-
-
- Task: PointSelect (pPointList,pRelToWindow := 1, pSpecifier := 1)
- Library: Select.Lib
- Header:
- #########################################################################
- # PointSelect (pPointList,pRelToWindow, pSpecifier)
- #========================================================================
- # Author: SMQ
- # Description: This routine moves the mouse to the location specified
- # by pPointList and clicks to select the point.
- # Parameters: pPointList - List - holds the x-y coordinates of the point
- # pRelToWindow - 1 - coords are relative to the window
- # 0 - coords are absolutes, with respect
- # to the screen.
- # pSpecifier - Enables caller to specify the window the move
- # will be relative to. (0 = document window)
- # Returns: what MoveRelativeToWindow() or MoveMouse() return
- # Examples: PointSelect ({120,100},1, 0)
- # Assumptions:
- #========================================================================
- Calls: MoveRelativeToWindow(), MoveMouse(),
- Is called by: SelectIt()
-
-
- Task: RectSelect (Rect,RelToWindow := 1)
- Library: Select.Lib
- Header:
- #########################################################################
- # RectSelect (Rect,RelToWindow)
- #========================================================================
- # Author: SMQ
- # Description: This routine selects the rectangle specified by Rect.
- # It moves the mouse to the location specified by the
- # first 2 elements in Rect and everything up to the
- # location specified by the next 2 elements.
- # Parameters: Rect - holds the left, top, right and bottom
- # coordinates of the rect.
- # RelToWindow - 1 - coords are relative to the window
- # 0 - coords are absolutes, with respect
- # to the screen.
- # Returns: Nothing
- # Examples: RectSelect (Rect,1)
- # Assumptions: Ruler is not shown
- #========================================================================
- Calls: MoveRelativeToWIndow(), _click(), MoveMouse(),
- Is called by: SelectIt()
-
-
- Task: HereToStartSelect()
- Library: Select.Lib
- Header:
- #########################################################################
- # HereToStartSelect()
- #========================================================================
- # Author: SMQ
- # Description: This routine selects everything from the current
- # position to the start (Top) of the file.
- # Parameters: None
- # Returns: Nothing
- # Examples: HereToStartSelect()
- # Assumptions: Ruler is not shown, coordinates used are relative
- # to the window, as opposed to the screen.
- #========================================================================
- Calls: GetVHScrollBars(), ScrollWindow(), _pressKey(), MoveRelativeToWindow(),
- _click(), _releaseKey(),
- Is called by: SelectIt()
-
-
- Task: HereToEndSelect()
- Library: Select.Lib
- Header:
- #########################################################################
- # HereToEndSelect()
- #========================================================================
- # Author: SMQ
- # Description: This routine selects everything from the current
- # position to the end (Bottom) of the file.
- # Parameters: None
- # Returns: Nothing
- # Examples: HereToEndSelect()
- # Assumptions: Ruler is not shown, coordinates used are relative
- # to the window, as opposed to the screen.
- #========================================================================
- Calls: GetVHScrollBars(), ScrollWindow(), _pressKey(), ExceptionDispatcher(),
- MoveRelativeToWindow(), _click(), _releaseKey()
- Is called by: SelectIt()
-
-
- Task: SelectAll()
- Library: Select.Lib
- Header:
- #########################################################################
- # SelectAll()
- #========================================================================
- # Author: SMQ
- # Description: This routine selects everything from the top of the
- # frontmost window to the bottom.
- # Parameters: None
- # Returns: Nothing
- # Examples: SelectAll()
- # Assumptions: Ruler is not shown, coordinates used are relative
- # to the window, as opposed to the screen.
- #========================================================================
- Calls: _match(), SelectMenuItem(), GetVHScrollBars(), ScrollWindow(),
- MoveRelativeToWindow(), _click(), _pressKey(), ExceptionDispatcher(),
- _releaseKey()
- Is called by: SelectIt()
-
-
- Task: RandomTextSelection(pSpecifier := 0, pWindowInset := {0,0,22,22})
- Library: Select.Lib
- Header:
- #########################################################################
- # RandomTextSelection(pSpecifier, pWindowInset)
- #========================================================================
- # Author: KTA
- # Description: Matches the current document window, clicks in a random location,
- # press the shiftkey, move to another random location and click.
- # This will select all text between the two random points.
- # Parameters: pSpecifier - window specifier.
- # pWindowInset - inset into the window for the content region
- # Returns: nothing
- # Example: RandomTextSelection();
- #========================================================================
- Calls: findWindow(), getXYRandom(), MoveRelativeToWindow(), _pressKey(),
- _releaseKey(), logStr()
- Is called by:
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: StandardFile.Lib
- Calls: "String.Lib","TCS.Lib","Output.Lib","UserInterface.Lib",
- "ExceptionHandling.lib", "TargetCheck.Lib";
-
-
-
- Task: SaveAs(pNameDoc := "", pReplaceFlag := true, pSelectSaveAs := False,
- pPathlist := global gSFPUTLocation, pCheckSaveDocWindow := 1)
- Library: StandardFile.Lib
- Header:
- #########################################################################
- # SaveAs(pNameDoc, pReplaceFlag, pSelectSaveAs, pPathlist)
- #========================================================================
- # Author: KTA
- # Description: This routine will type a name (pNameDoc) into the text edit
- # field. Then it will press the ReturnKey to save the file.
- # If there is a document already named <pNameDoc> a dialog will
- # appear. If the <pReplaceFlag> evaluates to false
- # it will select NO to 'Replace Existing?' dialog. It will
- # then type the time (based on a 24 hour clock) after the
- # name and retype the ReturnKey. The Default is to replace
- # an existing document with the same name. It will also call
- # getNewFileName to create a file name if one is not provided.
- # Parameters: pNameDoc - string holding the name to name the document
- # pReplaceFlag - 0 to select 'No' to 'Replace Existing' dialog
- # 1 to select 'Yes' to replace exisiting file.
- # pSelectSaveAs - Flag which indicates whether or not to select
- # SaveAs menuItem.
- # 0 - Do not select SaveAs MenuItem
- # 1 - Select the SaveAs menuItem
- # {List} - Select the SaveAs menuItem using the
- # ord specified. e.g. {5,2}
- # pPathlist - Path to navigate before saving - should be complete path.
- # Returns: 0 - Unable to dismiss SFPut or never present to begin with
- # 1 - Dismissed SFPut ok, saved file, ReplaceExist not called
- # 2 - Dismissed SFPut ok, saved file, ReplaceExist called
- # Examples: SaveAs('Untitled1'); to name the file 'Untitled1'
- # Assumptions: That the SF_Put dialog is present
- #
- #========================================================================
- Calls: TCSStart(), selectmenuItem(), TCSEnd(), IsStandardFile(), _match(),
- GetNewFileName(), TruncateString(), SFNavigate(), gSaveAsHook1,
- TypeStr(), SpecialKey(), gReplaceExisting, _MatchBoolean(),
- _collect(), ReplaceExist(), DialogCheck(), gSaveAsHook2, FindWindow(),
- gSaveAsHook3, LogStr(),
- Is called by: DoFiles(), DoCloseApp(), Quit(), Save(), TimeSaveAs(), CloseWindow()
-
-
- Task: OpenFile(pNameDoc := "", pSelectOpen := 1, pPathList :={}, pPartialPath := 0)
- Library: StandardFile.Lib
- Header:
- #########################################################################
- # OpenFile(pNameDoc,pSelectOpen, pPathList, pPartialPath)
- #========================================================================
- # Author: KTA
- # Description: This routine will select 'Open' from the 'File' menu, type
- # the string held in the pNameDoc parameter, and
- # then press the returnkey. It will check to see that
- # the frontmost window's title contains pNameDoc. If not,
- # it assumes that the wrong file opened. It will not select
- # 'Open' if the pSelectOpen parameter is false.
- # Parameters: pNameDoc - string name of document to open
- # pSelectOpen - 0 to disable selecting of the 'Open' menu item.
- # 1 to select 'Open' from the 'File' menu
- # 2 keyEq - 'o'
- # list - list containing ordinality of 'Open' menuItem.
- # pPathList - list defining path if file named <pNameDoc> not in
- # the current directory
- # pPartialPath := Whether to start navigation at the current dir or
- # at the desktop
- # 1 - start at current directory
- # 0 - start at desktop (not partial)
- # Returns: 1 - Document opened OK
- # 0 - Document not opened OK
- # Assumptions: Works with SF_Get, but don't have pNameDoc be to long
- # of a string.
- # Examples: OpenFile('Untit'); will select a document such as 'Untitled'.
- #========================================================================
- Calls: TCSStart(), selectmenuItem(), KeyEq(), IsStandardFile(), LogStr(),
- SFNavigate(), gOpenFileHook1, TypeStr(), SpecialKey(), DialogCheck(),
- gOpenFileHook2, FindWindow(), _match(), isSubString(), TCSEnd(),
- Is called by: DoFiles(), TimeOpenFile()
-
-
- Task: SFNavigate( pPathList :={},pTEToggle :=0, pFinalReturn := 1, pPartialPath := 0)
- Library: StandardFile.Lib
- Header:
- #########################################################################
- # SFNavigate(pPathList, pTEToggle, pFinalReturn, pPartialPath)
- #========================================================================
- # Author: KTA
- # Description: Controls the navigation in Standard File.
- # Assigns a global gSFOriginalPath to the current directory
- # for return navigation.
- # Passes all parameters to SFType which performs actual navigation.
- # Parameters: pPathList := List of directories beginning with the disk name.
- # if pathlist := {} navigation will go to the Desktop.
- # otherwise it should be in the form {'hd', 'folder'};
- # pTEToggle := Whether toggling from a text edit field is required
- # to navigate.
- # 1 - Toggle
- # 0 - No toggling required
- # pPartialPath := Whether to start navigation at the current dir or
- # at the desktop
- # 1 - start at current directory
- # 0 - start at desktop
- # pFinalReturn := Whether to accept the final item in <pPathList>
- # Returns: PathList
- # Also sets global gSFOriginalPath to the original path
- #========================================================================
- Calls: IsStandardFile(), ExceptionDispatcher(), LogStr(), SFType(),
- Is called by: ShimmerMateCopy(), SaveAs(), OpenFile()
-
-
- Task: SFType(pPathList,pTEToggle :=0, pFinalReturn := 1, pPartialPath := 0)
- Library: StandardFile.Lib
- Header:
- #########################################################################
- # SFType(pPathList, pTEToggle, pFinalReturn, pPartialPath)
- #========================================================================
- # Author: KTA
- # Description: Performs navigation in Standard File.
- # If <pPartialPath> evaluates to false, Selects the 'DeskTop' button.
- # Then types each item in <pPathList> followed by a returnKey.
- # Parameters: pPathList := List of directories beginning with the disk name.
- # pTEToggle := Whether toggling from a text edit field is required
- # to navigate.
- # 1 - Toggle
- # 0 - No toggling required
- # pPartialPath := Whether to start navigation at the current dir or
- # at the desktop
- # 1 - start at current dir
- # 0 - start at desktop
- # pFinalReturn := Whether to accept the final item in <pPathList>
- # Returns: Nada
- #========================================================================
- Calls: _MatchBoolean(), SelectButton(), _type(), TypeList()
- Is called by: SFNavigate()
-
-
- Task: ReplaceExist( pReplaceFlag := true, pNameDoc :='')
- Library: StandardFile.Lib
- Header:
- #########################################################################
- # ReplaceExist( pReplaceFlag,pNameDoc)
- #========================================================================
- # Author: KTA
- # Description: Handles the 'Replace existing?' dialog.
- # Parameters: pReplaceFlag - Whether to Replace a document with the same name
- # or generate a unique name.
- # 1 - Overwrite document with same name.
- # 0 - Do not overwrite. Generate unique name.
- # pNameDoc := Name of file which already exists on disk.
- # Returns: pNameDoc ( will be identical to the initial one if pReplaceFlag is set)
- #========================================================================
- Calls: LogStr(), gReplaceExistHook1, _collect(), TCSStart(), SelectButton(),
- TCSEnd(), GetNewFileName(), _type(), SpecialKey(), TruncateString(),
- TypeStr(), gReplaceExistHook2
- Is called by: SaveAs(),
-
-
- Task: GetNewFileName(pFileName :="",pIncludeNameFlag := 0)
- Library: StandardFile.Lib
- Header:
- #########################################################################
- # GetNewFileName(pFileName, pIncludeNameFlag)
- #========================================================================
- # Author: SL
- # Description: Gets a new file name by concatenating the app name and
- # the current time.
- # Parameters: pFileName - If this parameter is present, this routine will
- # only pass back the time. If this parameter is not
- # present, then this routine will pass back a string
- # consisting of the application name with the time
- # appended to it.
- # pIncludeNameFlag - if true will append time and Sec to end of
- # name and return it.
- # Returns: newFileName - string name for new file name
- # or just a time and Sec string
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: SaveAs(), ReplaceExist(),
-
-
- Task: SFSelectPopupMenuItem( pPopupMenuItem := '')
- Library: StandardFile.Lib
- Header:
- #########################################################################
- # SFSelectPopupMenuItem(pPopupMenuItem)
- #========================================================================
- # Author: KTA
- # Description: Selects the popup menu item <pPopupMenuItem> from the Standard
- # File dialog.
- # Parameters: pPopupMenuItem - The ordinality or Title of the menuitem (where
- # the Displayed menuItem is ord 1 if using Ordinality).
- # Returns: nothing
- # Examples: SelectPopupMenuItem("Font");
- # SelectPopupMenuItem(2);
- # Assumptions: The popup menu is in window ord 1
- #========================================================================
- Calls: IsStandardFile(), ExceptionDispatcher(), MoveMouse(), _pressMouse(),
- _move(), _releaseMouse(), LogStr(),
- Is called by:
-
-
- Task: ModifyDocument()
- Library: StandardFile.Lib
- Header:
- #########################################################################
- # ModifyDocument()
- #========================================================================
- # Author: KTA
- # Description: This task is called to modify a document so a revert to saved can
- # be performed. If a global tqask reference (gModifyDocument) is
- # defined, it will be called. Otherwise the default of typing a
- # string will be used.
- # Parameters: none
- # Returns: 0 - failure
- # 1 - success
- # Examples: ModifyDocument()
- # Assumptions:
- #========================================================================
- Calls: TCSStart(), gModifyDocument, TypeStr(), TCSEnd()
- Is called by: DoFiles()
-
-
- Task: Revert(pRevertMI := '')
- Library: StandardFile.Lib
- Header:
- #########################################################################
- # Revert(pRevertMI)
- #========================================================================
- # Author: KTA
- # Description: If RevertMI is defined as the menuItem for revert it will be selected.
- # Otherwise a menuItem with the word 'Revert' in it will be selected.
- # A dialog will normally appear confirming the revert request.
- # Several methods will be used when attempting to dismiss the dialog.
- # Attempts to matck buttons "OK", "Yes", "Revert", are made, then
- # typing the returnKey. If RevertMi is defined then DialogCheck()
- # Will be called to output the static text in the dialog and the type
- # the returnKey.
- # Parameters: pRevertMI - List containing the ordinality of the revert menuItem.
- # Returns: nada
- # Examples: Revert()
- # Assumptions:
- #========================================================================
- Calls: TCSStart(), _matchBoolean(), SelectMenuItem(), SelectButton(),
- SpecialKey(), DialogCheck(), ExceptionDispatcher(), logstr(), TCSEnd()
- Is called by: DoFiles()
-
-
- Task: IsStandardFile(pLogIt := 1)
- Library: StandardFile.Lib
- Header:
- #########################################################################
- # IsStandardFile(pLogIt)
- #========================================================================
- # Author: KTA
- # Description: Checks to see if the Standard File dialog is present
- # Parameters: pLogIt - Flag indicating whether or not to output
- # the nonexistence of the StandardFile dialog.
- # Returns: 1 - if the Standard File dialog is present
- # 0 - if the Standard File dialog is not present
- # Examples: IsStandardFile()
- # Assumptions:
- #========================================================================
- Calls: _matchBoolean(), _match(), _collect(), LogStr()
- Is called by: SaveAs(), OpenFile(), SFNavigate(), SFSelectPopupMenuItem(),
- CancelStandardFile(), Save(), CloseWindow()
-
-
- Task: CancelStandardFile(pHowCancel := 0, pSaveAsMenu := 0)
- Library: StandardFile.Lib
- Header:
- #########################################################################
- # CancelStandardFile(pHowCancel, pSaveAsMenu)
- #========================================================================
- # Author: KTA
- # Description: Selects Save As and Cancels it
- # Parameters: pHowCancel - method to cancel
- # 0 := KeyEq('.');
- # 1 := selectButton('Cancel');
- # 2 := SpecialKey(escapeKey,"Escape key");
- # pSaveAsMenu - list containing the ordinality of 'Save As' menu item.
- # - anything else will cause the hardcoded string 'Save As'
- # to be use in matching the menuItem.
- # Returns: 1 - if cancelling occured as expected
- # 0 - if it didn't
- # Examples: CancelStandardFile()
- # Assumptions:
- #========================================================================
- Calls: TCSStart(), SelectMenuItem(), IsStandardFile(), KeyEq(), _matchBoolean(),
- selectButton(), SpecialKey(), TCSEnd(),
- Is called by: DoFiles()
-
-
- Task: Save(pSaveMethod := 1)
- Library: StandardFile.Lib
- Header:
- #########################################################################
- # Save(pSaveMethod)
- #========================================================================
- # Author: KTA
- # Description: Selects Save - calls Save As if Standard File appears
- # Parameters: pSaveMethod - Method to save
- # 1 := Save from File Menu
- # 2 := Command-'s'
- # Returns: Nothing
- # Examples: Save()
- # Assumptions:
- #========================================================================
- Calls: _matchBoolean(), TCSStart(), TCSEnd(), isStandardFile(), SaveAs(), keyEq()
- Is called by: DoFiles()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: String.Lib
- Calls:
-
-
-
- Task: IsSubString(str1, str2)
- Library: String.Lib
- Header:
- #########################################################################
- # IsSubString(str1, str2)
- #=======================================================================
- # Author: SL
- # Description: Checks to see if str1 is in str2.
- # Parameters: str1 := Substring to be searched for.
- # str2 := String.
- # Returns: 0 := str1 is not in str2.
- # 1 := str1 is in str2.
- #=======================================================================
- Calls:
- Is called by: Twitcher(), LaunchByTypeSelect(), VerifyAppPriorToLaunch(),
- OpenFile(), DialogCheck()
-
-
- Task: PointListToStr(pointList := {})
- Library: String.Lib
- Header:
- #########################################################################
- # PointListToStr(pts)
- #=======================================================================
- # Author: DM
- # Description: Converts a list of points to a string.
- # Parameters: pt := List of coordinate pairs.
- # Returns: 0 := if the conversion fails.
- # 1 := The pt as a string.
- #=======================================================================
- Calls:
- Is called by: DrawObject()
-
-
- Task: FindPos(char, str, startPos:= 1)
- Library: String.Lib
- Header:
- #########################################################################
- # FindPos(char, str, startPos)
- #=======================================================================
- # Author: SL
- # Description: Finds the first occurence of char in str starting
- # from startPos.
- # Parameters: char := A character to be searched for.
- # str := String.
- # startPos:= Starting position to be searched.
- # Returns: 0 := Char is not in str starting from
- # startPos.
- # pos := Char position of its first occurence
- # starting from startPos.
- #=======================================================================
- Calls:
- Is called by:
-
-
- Task: SubString(String,StartChar,NumChar)
- Library: String.Lib
- Header:
- #########################################################################
- # Substring(String,StartChar,NumChar)
- #=======================================================================
- # Author: PF
- # Description: Returns the first <NumChar> characters of the passed <String>
- # starting at position <StartChar>.
- # Parameters: String - String to use
- # StartChar - integer - position of character to start making substring.
- # new string will begin with character at this position.
- # NumChar - Integer number of characters to return
- # Returns: string
- # Assumptions: none
- #=======================================================================
- Calls: Substring ()
- Is called by: Substring ()
-
-
- Task: RandomString(NumChar := 3)
- Library: String.Lib
- Header:
- #########################################################################
- # RandomString( NumChar )
- #========================================================================
- # Author: KTA
- # Description: Generate Random strings <NumChar> long.
- # Parameters: NumChar := Length of random string to generate
- # Returns: The random string.
- # Examples: RandomString( 5 ); - Random String 5 characters in length
- # Assumptions: That you want Caps, lower case, numbers and punctuation
- #========================================================================
- Calls:
- Is called by: TypeWord()
-
-
- Task: FormPositiveInteger(str, start_index := 1, end_index := -1)
- Library: String.Lib
- Header:
- ##############################################################
- ##############################################################
- Calls:
- Is called by:
-
-
- Task: CharToDigit(character)
- Library: String.Lib
- Header:
- ##############################################################
- ##############################################################
- Calls:
- Is called by: FormPositiveInteger()
-
-
- Task: StripCarriageReturn(pLine)
- Library: String.Lib
- Header:
- #########################################################################
- # StripCarriageReturn(pLine)
- #========================================================================
- # Author: KTA
- # Description: returns a string that contains all of the characters in
- # <pLine> up to but not including the carriage return.
- # Parameters: pLine - The line of text
- # Returns: string without the carriage return
- # Examples: StripCarriageReturn();
- # Assumptions: None
- #========================================================================
- Calls: StringUntilChar()
- Is called by:
-
-
- Task: StringUntilChar(pTheString, pTheChar, pIncludeTheChar := 0,
- pNumOccurences := 1)
- Library: String.Lib
- Header:
- #########################################################################
- # StringUntilChar(pTheString, pTheChar, pIncludeTheChar, pNumOccurences)
- #========================================================================
- # Author: KTA
- # Description: returns a string that contains all of the characters in
- # <pTheString> up to <pTheChar>. If <pIncludeTheChar> evaluates to
- # true <pTheChar> will be included in the returned string.
- # Parameters: pTheString - The string
- # pTheChar - the character to search for
- # pIncludeTheChar - Boolean indicates whether or not to include
- # <pTheChar>.
- # pNumOccurences - indicates how many times <pChar> should occur
- # prior to returning the string.
- # Returns: returns a string that contains all of the characters in
- # <pTheString> up to (but not necessarily including) <pTheChar>.
- # Examples: StringUntilChar();
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: StripCarriageReturn()
-
-
- Task: NumTimesCharInString(pTheString, pTheChar)
- Library: String.Lib
- Header:
- #########################################################################
- # NumTimesCharInString(pTheString, pTheChar)
- #========================================================================
- # Author: KTA
- # Description: returns an integer that indicates the number of times <pChar>
- # occurs in <pTheString>.
- # Parameters: pTheString - The string
- # pTheChar - the character to search for
- # Returns: returns an integer that indicates the number of times <pChar>
- # occurs in <pTheString>.
- # Examples: NumTimesCharInString("hd:thisFolder:ThatFolder:FileName", ":");
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: CopyFileToPath()
-
-
- Task: StringAfterChar(pTheString, pTheChar, pIncludeTheChar := 0,
- pNumOccurences := 1)
- Library: String.Lib
- Header:
- #########################################################################
- # StringAfterChar(pTheString, pTheChar, pIncludeTheChar, pNumOccurences)
- #========================================================================
- # Author: KTA
- # Description: returns a string that contains all of the characters in
- # <pTheString> after <pTheChar>. If <pIncludeTheChar> evaluates to
- # true <pTheChar> will be included in the returned string.
- # Parameters: pTheString - The string
- # pTheChar - the character to search for
- # pIncludeTheChar - Boolean indicates whether or not to include
- # <pTheChar>.
- # pNumOccurences - indicates how many times <pChar> should occur
- # prior to creating the returned string.
- # Returns: returns a string that contains all of the characters in
- # <pTheString> after <pTheChar>.
- # Examples: StringAfterChar();
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: CopyFileToPath(), GetROMBuild()
-
-
- Task: TruncateString(pTheString, pNumChars)
- Library: String.Lib
- Header:
- #########################################################################
- # TruncateString(pTheString, pNumChars)
- #========================================================================
- # Author: KTA
- # Description: Truncates the string <pTheString> to be no more than <pNumChars>
- # in length.
- # Parameters: pTheString - The string
- # pNumChars - the number of character desired.
- # Returns: returns a string which contains no more than <pNumChars> characters.
- # Examples: TruncateString("HelloWorld", 4);
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: SaveAs(), ReplaceExist(), ConcatNameString()
-
-
- Task: ConcatNameString(pMainString, pAppendString, pMaxChars)
- Library: String.Lib
- Header:
- #########################################################################
- # ConcatNameString(pMainString, pAppendString, pMaxChars)
- #========================================================================
- # Author: ML
- # Description: Concats a main string and append string, checking to see if
- # if falls withing allowable limits and truncating main string
- # if it doesn't.
- # Parameters: pMainString - The main string. Will be truncated if
- # concatenated string is too long
- # pAppendString - the string to append. Will not be truncated.
- # pMaxChars - the maximum number of characters allowed.
- # Returns: concatenated string.
- # Examples: TruncateString("Target Crash File", "1215", 31);
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: GatherTargetCrashLog()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: TargetCheck.Lib
- Calls: 'Output.Lib', "MemoryMonitorOperations.lib",
- "Globals.Lib", "UserInterface.Lib", "TCS.Lib", "Gestalt.Lib", "OnTarget.Lib",
- "OnTargetOperations.Lib", "FileToolOperations.Lib",
- "ExceptionHandling.Lib","String.Lib";
-
-
-
- Task: SystemFileInfo( pFileType )
- Library: TargetCheck.Lib
- Header:
- #########################################################################
- # SystemFileInfo( pFileType )
- #========================================================================
- # Author: ML
- # Description: Provides info on the targets system files
- # Parameters: pFileType: 'extn' - info on extensions
- # 'ctrl' - info on control panels
- # 'macs' - info on system folder root files
- # Returns: 0 - Failure
- # List of list of file name, list of type, version, i.e.
- # {
- # { 'PrintMonitor',{ 'APPL','7.1.2' } },
- # ' EM Extension',{ 'INIT','3.0' } }, ...
- # }
- #
- # Examples: SystemFileInfo('extn');
- # Assumptions: Finder Scripting Extension, program linking, guest access
- # must be installed and enabled on target for this task
- # to succeed.
- # Notes: List returned is optimized for obtaining info based on file
- # name, i.e. assoc ("Monitors", SystemFileInfo( 'ctrl' ));
- # will return {type, version} of the Monitors cDev.
- #========================================================================
- Calls: logstr(),
- Is called by:
-
-
- Task: Restart(Time_to_restart := 25)
- Library: TargetCheck.Lib
- Header:
- #########################################################################
- # Restart()
- #========================================================================
- # Author: RV
- # Description: Restarts and reaquires Targets
- # Parameters: None
- # Returns: 1 - Success
- # 0 - Failure
- # Examples: Restart();
- # Assumptions: None
- #========================================================================
- Calls: ExceptionDispatcher(), _select(), _collect(), _match(), _matchBoolean(),
- LogStr(),
- Is called by:
-
-
- Task: MatchApplication(logMe := 1, UpdateAppTitle :=1)
- Library: TargetCheck.Lib
- Header:
- #########################################################################
- # MatchApplication(logMe,UpdateAppTitle)
- #========================================================================
- # Author: KTA
- # Description: This routine will match the current Application and,
- # if the logMe parameter is 1, will log the current
- # application name by passing it to LogStr(). If a
- # parameter is not passed, the default behavior will
- # log the application's title. This routine will also
- # set the global gAppTitle to the application's title.
- # Output appears in the following format:
- # The current application is "Finder"
- # Parameters: logMe - 1 to print the current application's title
- # 0 not to print the application's title
- # UpdateAppTitle - 1 to update the global AppTitle
- # - 0 not to update global AppTitle
- # Return Value: string holding current application's title
- # Examples: MatchApplication();
- # Assumptions: there is an active application
- #========================================================================
- Calls: ExceptionDispatcher(), LogStr()
- Is called by: Scrapbook(), DoSetUpApp(), Twitcher(), MiniLaunch(), Quit(),
- LaunchTwitch()
-
-
- Task: RecordGetAboutThisMacintosh(pPhysicalRAM := 1, pLogicalRAM := 1,
- pLargestUnusedBlock := 1,pSystemSize := 1, pAppName := global gApptitle)
- Library: TargetCheck.Lib
- Header:
- #########################################################################
- # RecordGetAboutThisMacintosh(pPhysicalRAM, pLogicalRAM, pLargestUnusedBlock, pSystemSize)
- #========================================================================
- # Author: KTA
- # Description: Makes the calls to create TCSes which record the
- # current Physical RAM, logical RAM, largest unused block, and system
- # size to a Phoenix output file.
- # Parameters: pPhysicalRAM - 1 Report PhysicalRAM size.
- # - 0 Don't report PhysicalRAM size.
- # pLogicalRAM - 1 Report LogicalRAM size.
- # - 0 Don't report LogicalRAM size.
- # pLargestUnusedBlock - 1 Report LargestUnusedBlock size.
- # - 0 Don't report LargestUnusedBlock size.
- # pSystemSize - 1 Report system size.
- # - 0 Don't report system size.
- # pAppName - string name of app to get memory size of
- # - 0 Don't report application size.
- # Returns: {list} - List of sizes you've requested
- # 0 - unsuccessful
- # Examples: RecordGetAboutThisMacintosh();
- # Assumptions:
- #========================================================================
- Calls: _MemoryMonitor(), TCSStart(), TCSEnd(),
- Is called by: ProfileApplication(), SuiteStart()
-
-
- Task: FileShare()
- Library: TargetCheck.Lib
- Header:
- ##################################################################################
- # FileShare()
- #=======================================================================
- # Author: GS
- # Description: Checks to see if fileshare was installed and whether its switched on.
- #
- # Parameters: None
- # Returns: On := 1
- # Off := 0
- # not Avail:= -1
- # GestaltError
- #=======================================================================
- Calls: OnTargetInit(), _OnTarget(),
- Is called by: MachineState()
-
-
- Task: MachineState(printMachineState := 0, pUseXTools := 1)
- Library: TargetCheck.Lib
- Header:
- ##################################################################################
- # MachineState()
- #=======================================================================
- # Author: GS
- # Description: Returns a list of information concerning the state of the target
- # machine.
- #
- # Parameters: None
- # Returns: Gestalt Info
- #=======================================================================
- Calls: ExceptionDispatcher(), _Gestalt(), CheckVM(), FileShare(), GetROMBuild(),
- Is called by: BuildSuiteFields()
-
-
- Task: CheckCache()
- Library: TargetCheck.Lib
- Header:
- ##################################################################################
- # CheckCache()
- #=======================================================================
- # Author: GS
- # Description: Checks to see if caching is available and turned on, and returns
- # a value.
- #
- # Parameters: None
- # Returns: On := 1
- # Off := 0
- # not Avail := -1
- # GestaltError
- #=======================================================================
- Calls: GestaltProcessorType(), OnTargetInit(), _OnTarget(),
- Is called by: MachineState()
-
-
- Task: RecordMonitorInfo()
- Library: TargetCheck.Lib
- Header:
- #########################################################################
- # RecordMonitorInfo(pReturnList)
- #========================================================================
- # Author: ML
- # Description: Makes the calls to create TCSes which record the
- # target monitors' bit depth and coordinates
- # Returns: {list} - list of monitor info {{bit depth,{l,t,r,b}}}
- # 0 - unsuccessful
- # Examples: RecordMonitorInfo();
- # Assumptions:
- #========================================================================
- Calls: _collect(), TCSStart(), TCSEnd(),
- Is called by: SuiteStart()
-
-
- Task: ProfileApplication (appname:= global gApptitle)
- Library: TargetCheck.Lib
- Header:
- #########################################################################
- # ProfileApplication()
- #========================================================================
- #
- # Author: ML
- #
- # Description: Determines app process info, version info and
- # whether it is FAT, native, or 68k.
- # Parameters: appname - name of app in process list
- # Returns: none
- # Examples: AppInfo()
- # Notes: Requires Memory Monitor and Filetool on target and
- # corresponding libs on the host.
- #========================================================================
- Calls: _matchBoolean(), RecordGetAboutThisMacintosh(), _MemoryMonitor(),
- _FileTool(), IsPowerPC(),
- Is called by: DoSetUpApp()
-
-
- Task: GetROMBuild()
- Library: TargetCheck.Lib
- Header:
- #########################################################################
- # GetROMBuild()
- #========================================================================
- # Description: Reads the target ROM and returns the build of the ROM.
- # Note: this is not the ROM Version as returned by Gestalt.
- # Reads a short at offset 18 from ROM base @ 0x2AE+Ox12, then
- # returns the formatted results.
- # Parameters: none
- # Returns: Formated string which is the build of the ROM.
- # Examples: GetROMBuild()
- # Notes: Requires Memory Monitor version 1.0.5 or greater (reading
- # ROM addresses was added to this build)
- #========================================================================
- Calls: _MemoryMonitor(), NumToStr(), StringAfterChar(),
- Is called by: MachineState()
-
-
- Task: IsPowerPC()
- Library: TargetCheck.Lib
- Header:
- #########################################################################
- # IsPowerPC()
- #=======================================================================
- # Author: KTA
- # Description: Makes a call to ProcessorType() to determine if the
- # target system is PowerPC or not
- # Parameters: none
- # Returns: 0 - not PowerPC
- # 1 - PowerPC
- #=======================================================================
- Calls: GestaltSystemArchitecture()
- Is called by: PreFlight(), ProfileApplication()
-
-
- Task: IsSystem7()
- Library: TargetCheck.Lib
- Header:
- #########################################################################
- # IsSystem7()
- #=======================================================================
- # Author: KTA
- # Description: Makes a gestalt call to to determine if the
- # target system is system 7.0 or greater.
- # Parameters: none
- # Returns: 0 - not system 7.0 or greater
- # 1 - system 7.0 or greater
- # Note: the global gIsSys7 will also be set as a side effect
- # of calling this task.
- #=======================================================================
- Calls: _Gestalt()
- Is called by: Twitcher(), Quit(), LaunchTwitch(), SaveAs(), OpenFile(),
- InitTCSLogging()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: TCS.Lib
- Calls: "Utility.lib","UserInterface.Lib", "Results Express.lib",
- "Globals.lib", "CrashHandling.lib", "String.Lib", "OutPut.Lib",
- "TargetCheck.Lib", 'ExceptionHandling.Lib';
-
-
-
- Task: InitTCSLogging( pTestCaseLoggingMethod := global gTestCaseLoggingMethod )
- Library: TCS.Lib
- Header:
- #########################################################################
- # InitTCSLogging(pSetupFileToolOutput)
- #========================================================================
- # Author: KTA
- # Description: Initializes globals and <Constants> necessary for generating
- # database records known as TCS (Test Case Specification) records.
- # Parameters: pTestCaseLoggingMethod - The logging method
- # Returns: Nothing
- # Examples: InitTCSLogging(1,1);
- # Assumptions: None
- #========================================================================
- Calls: ExceptionDispatcher(), IsSystem7(), SetUpOutput()
- Is called by: SuiteStart()
-
-
- Task: SuiteStart(pScriptName := '', pScriptParamList := '',
- pScriptVersion := 'xxx', pMatrixID := 0, pUseXTools := 1 )
- Library: TCS.Lib
- Header:
- #########################################################################
- # SuiteStart(pScriptName, pScriptParamList, pScriptVersion)
- #========================================================================
- # Author: GS
- # Description: Start Suite Record.
- # Parameters: pScriptName - Name of the current script
- # pScriptParamList - list of VU parameters for the current execution
- # pScriptVersion - version of the current script
- # pMatrixID - Id for the matrix.
- # pUseXTools - Flag which indicates whether its ok to use external tools
- # when building the suite header, Ontarget is used to determine if
- # filesharing in ON, MemoryMonitor is used to read the ROMBuild.
- # Returns: Nothing
- # Examples: SuiteStart("MacDraw.vu", {1}, '1.1.2');
- # Assumptions: None
- #========================================================================
- Calls: InitGlobals(), InitTCSLogging(), InstallEveryTimeMacro(), gSuiteStartHook,
- LogStr(), BuildSuiteFields(), RecordMonitorInfo(),
- RecordGetAboutThisMacintosh(), BeginTimer()
- Is called by:
-
-
- Task: SuiteEnd(pCompletionCode := 1, pCheckIfSystemFailed := 1)
- Library: TCS.Lib
- Header:
- #########################################################################
- # SuiteEnd(pCompletionCode)
- #========================================================================
- # Author: GS
- # Description: End Suite Record.
- # Parameters: pCompletionCode - Code which indicates success of suite
- # 1 - Completed successfully
- # 0 - Completed unsuccessfully
- # Returns: Nothing
- # Examples: SuiteEnd(1);
- # Assumptions: none
- # Additional information concerning global gAdditionalSuiteInfoFT:
- # gAdditionalSuiteInfoFT has been provided to allow additonal information to be written
- # to the suite block. If there is additonal information that needs to be written to
- # the suite block, gAdditionalSuiteInfoFT needs to be defined as a formatted string.
- # The string should be defined as 1 or more Phoenix data fields.
- # Each new field should be in the form of "∂t∂t<FieldLabel>:∂t<FieldData>∂n"
- # If there are multiple fields that need to be returned, they should be
- # concatenated and returned as a single string. Note: the default setting is that
- # gAdditionalSuiteInfoFT is undefined and thus nothing will be added to the suite footer
- # unless explicitly defined.
- #========================================================================
- Calls: CheckforSystemFailure(), GetCurrentTime(), ExceptionDispatcher(),
- EqualREIDs(), AddSuiteFields(), LogStr(), gSuiteEndHook, gSuiteEndThreadingHook
- Is called by: CleanAbort()
-
-
- Task: TCSStart(pTCSId, pTextDesc, pAppName := global gAppTitle, pTargetAlive := 1)
- Library: TCS.Lib
- Header:
- #########################################################################
- # TCSStart(pTCSId, pTextDesc, pAppName)
- #========================================================================
- # Author: GS
- # Description: Start TCS Record.
- # Parameters: pTCSId - The TCS Id that results are being recorded for (list)
- # 1st element - Test Case number (integer)
- # 2nd element - Test Case Set (string)
- # 3rd element - Test Case Type (string)
- # 4th element - Test Case Owner (string)
- # pTextDesc - string that describes the Test Case
- # pAppName - defaults to gAppTitle, otherwise the name of the
- # application the Test Case applies to
- # Returns: Nothing
- # Examples: TCSStart();
- # Assumptions: None
- #========================================================================
- Calls: gTCSStartHook1, LogStr(), FillTCSId(), ExceptionDispatcher(), TCSPush(),
- ApplicationVerification()
- Is called by: GatherTargetCrashLog(), DefaultCrashHandler(), Scrapbook(),
- DoSetUpApp(), DrawObject(), UseClickTool(), UseDragTool(),
- UseDragClickTool(), UseMultiDragTool(), UseMultiClickTool(),
- UseMultiClickDragTool(), UseDragOffTool(), SetLineMenuItems(),
- SetFont(), SetStyle(), SetSize(), ReportSelectedMenuItems(),
- Twitcher(), Quit(), QuitBackgroundApps(), LaunchByAppleMenu(),
- LaunchByTypeSelect(), LaunchTwitch(), AboutBox(), SelFromDocWind(),
- SelFromPalWind(), SelFromCoord(), SelFromPopUp(), SelFromMenuItemPopUp(),
- PageSetup(), Printer(), SaveAs(), OpenFile(), ReplaceExist(),
- ModifyDocument(), Revert(), CancelStandardFile(), Save(),
- RecordGetAboutThisMacintosh(), RecordMonitorInfo(), LogPerformanceResults(),
- DragAcrossScreens(), SizeAcrossScreens(), DragWindow(), SizeWindow(),
- ZoomWindow(), CloseWindow(), ScrollWindow()
-
-
- Task: TCSEnd(pTCSId := {}, pResultCode := '', pErrStr := '', pTCSVal := '',
- pTCSStr := '', pCommentStr := '', pBailFlag := '')
- Library: TCS.Lib
- Header:
- #########################################################################
- # TCSEnd(pTCSId,pResultCode, pErrStr, pTCSVal, pTCSStr, pCommentStr)
- #========================================================================
- # Author: GS
- # Description: This task is called when the functionality of the pending TCS
- # is complete. It will pop the top TCS record from the TCS stack,
- # check to insure the TCS numbers match. If the result code (<pResultCode>)
- # is 0 a check will be done to insure no unexpected dialogs are present.
- # A call to ExceptionDispatcher() is made to insure that no VU errors were
- # encountered. Then the appropriate output task is called to output the
- # data.
- # Parameters: pTCSId - The TCS Id that results are being recorded for (list)
- # 1st element - Test Case number (integer)
- # 2nd element - Test Case Set (string)
- # 3rd element - Test Case Type (string)
- # 4th element - Test Case Owner (string)
- # pResultCode - The result of the TCS on top of Stack (Lifo)
- # pErrStr - Reason for failure if known.
- # pTCSVal - Any value a TCS needs to return for additional info.
- # pTCSStr - Any string a TCS needs to return for additional info.
- # pCommentStr - A string the TCS can return results in.
- # pBailFlag - incase of critical error we may need to dump the stack
- # - 'NoRecursion' this will avoid recursion
- # - any integer will bail the suite with the value of the integer
- # Returns: Nothing
- # Examples: TCSEnd();
- # Assumptions: None
- #========================================================================
- Calls: gTCSEndHook1, TopOfTCSStack(), TCTrackingOrNot(), CheckforSystemFailure(),
- TCSPop(), gExitVU, DialogHandler(), gLastResortHook, PrintTCSRecord(),
- EqualREIDs(), BuildTCSFields(), NewTestCase(), CleanAbort(), gTCSEndThreadingHook
- Is called by: GatherTargetCrashLog(), DefaultCrashHandler(), Scrapbook(),
- DoSetUpApp(), DrawObject(), UseClickTool(), UseDragTool(),
- UseDragClickTool(), UseMultiDragTool(), UseMultiClickTool(),
- UseMultiClickDragTool(), UseDragOffTool(), SetLineMenuItems(),
- SetFont(), SetStyle(), SetSize(), ReportSelectedMenuItems(),
- Twitcher(), Quit(), QuitBackgroundApps(), LaunchByAppleMenu(),
- LaunchByTypeSelect(), LaunchTwitch(), AboutBox(),
- SelFromDocWind(), SelFromPalWind(), SelFromCoord(),
- SelFromPopUp(), SelFromMenuItemPopUp(), PageSetup(),
- Printer(), SaveAs(), OpenFile(), ReplaceExist(),
- ModifyDocument(), Revert(), CancelStandardFile(), Save(),
- RecordGetAboutThisMacintosh(), RecordMonitorInfo(),
- ClearStack(), LogPerformanceResults(), DragAcrossScreens(),
- SizeAcrossScreens(), DragWindow(), SizeWindow(),
- ZoomWindow(), CloseWindow(), ScrollWindow()
-
-
- Task: SetUpOutput()
- Library: TCS.Lib
- Header:
- #########################################################################
- # SetUpOutput()
- #========================================================================
- # Author: KTA
- # Description: if global gTestCaseLoggingMethod = global kTCSResultsExpressMethod
- # ResultsExpress will be initialized.
- # Parameters: none
- # Returns: Nothing
- # Examples: SetUpOutput(1);
- # Assumptions:
- #========================================================================
- Calls:
- Is called by: InitTCSLogging()
-
-
- Task: FillTCSId( pTCSId )
- Library: TCS.Lib
- Header:
- #########################################################################
- # FillTCSId( pTCSId )
- #========================================================================
- # Author: naga
- # Description: Start TCS Record.
- # Parameters: pTCSId
- # Returns: new complete TCSId ( a list of 4 elements)
- # Examples: newId := FillTCSId( oldId );
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: TCSStart()
-
-
- Task: PrintTCSRecord(pTCSRecord, pResultCode, pErrStr, pTCSVal, pTCSStr, pCommentStr)
- Library: TCS.Lib
- Header:
- #########################################################################
- # PrintTCSRecord(pTCSRecord, pResultCode, pErrStr, pTCSVal, pTCSStr, pCommentStr)
- #========================================================================
- # Author: KTA
- # Description: Prints TCS record information to the notebook.
- # Parameters: pTCSRecord - The current TCS Record from top of stack
- # pResultCode - Result of the TCS
- # pCommentStr - String provided for returning results
- # pTCSVal - field for TCS specific values
- # pTCSStr - field for TCS specific strings
- # pErrStr - String for explaining failure
- # Returns: Nothing
- # Examples: PrintTCSRecord();
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: TCSEnd()
-
-
- Task: BuildSuiteFields( pScriptName := 'na', pScriptVersion := 'na',
- pScriptParameterList := "", pUseXTools := 1)
- Library: TCS.Lib
- Header:
- #########################################################################
- # BuildSuiteFields( pScriptName, pScriptVersion, pScriptParameterList, pUseXTools)
- #========================================================================
- # Author: RV
- # Description: Outputs suite header information utilizing Results Express
- # Parameters: pScriptName - Name of the current script
- # pScriptVersion - Version of the current script
- # pScriptParameterList - Parameters to the current script
- # pUseXTools -Flag which indicates whether its ok to use external tools
- # when building the suite header, Ontarget is used to determine if
- # filesharing in ON, MemoryMonitor is used to read the ROMBuild.
- # Returns: Nothing
- # Examples: LogSuiteHeader("MacDraw", '1.0',{1});
- # Assumptions: None
- #========================================================================
- Calls: MachineState(), ExceptionDispatcher(), GetCurrentTime(),
- Is called by: SuiteStart()
-
-
- Task: BuildTCSFields(pTCSRecord, pResultCode, pErrStr, pTCSVal, pTCSStr, pCommentStr )
- Library: TCS.Lib
- Header:
- #########################################################################
- # BuildTCSFields(pTCSRecord, pResultCode, pErrStr, pTCSVal, pTCSStr, pCommentStr )
- #========================================================================
- # Author: RV
- # Description: Builds a list of fields for the TCS record for use with Results Express.
- # Parameters: pTCSRecord - The current TCS Record from top of stack
- # pResultCode - Result of the TCS
- # pCommentStr - String provided for returning results
- # pTCSVal - field for TCS specific values
- # pTCSStr - field for TCS specific strings
- # pErrStr - String for explaining failure
- # Returns: list of fields (e.g. list of Label/Value pairs)
- # Examples: BuildTCSFields(thisTCS,1);
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: TCSEnd()
-
-
- Task: TopOfTCSStack()
- Library: TCS.Lib
- Header:
- #########################################################################
- # TopOfTCSStack()
- #========================================================================
- # Author: KTA
- # Description: Returns the top element of TCS stack.
- # Parameters: nothing
- #
- # Returns: thisTCS - TCS from the top of the stack
- # Examples: myTCS := TopOfTCSStack();
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: TCSEnd()
-
-
- Task: TCSPop()
- Library: TCS.Lib
- Header:
- #########################################################################
- # TCSPop()
- #========================================================================
- # Author: KTA
- # Description: Pops the top element from the stack and returns it.
- # Parameters: nothing
- #
- # Returns: thisTCS - TCS record from the top of the stack
- # Examples: myTCS := TCSPop();
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: TCSEnd()
-
-
- Task: TCSPush(pThisTCS)
- Library: TCS.Lib
- Header:
- #########################################################################
- # TCSPush(pThisTCS)
- #========================================================================
- # Author: KTA
- # Description: Push <pThisTCS> onto the stack
- # Parameters: pThisTCS - TCS record to push onto the stack
- #
- # Returns: Nothing
- # Examples: TCSPush(myTCS);
- # Assumptions: None
- #========================================================================
- Calls:
- Is called by: TCSStart()
-
-
- Task: ClearStack(pAbortReason := '')
- Library: TCS.Lib
- Header:
- #########################################################################
- # ClearStack(pFailReason)
- #========================================================================
- # Author: KTA
- # Description: Pops all of the TCSes from the TCS stack appropriately failing
- # them with an error code of -1
- # Parameters: pFailReason - Reason for failing TCS that is at the top of the stack.
- # Returns: Nothing
- # Examples: ClearStack('I wanted to');
- # Assumptions: None
- #========================================================================
- Calls: TCSEnd()
- Is called by: DefaultCrashHandler(), CleanAbort()
-
-
- Task: CleanAbort(pAbortReason := '', pSuiteComplete := 0)
- Library: TCS.Lib
- Header:
- #########################################################################
- # CleanAbort(pFailReason, pSuiteComplete := 0)
- #========================================================================
- # Author: GS
- # Description: Dumps the TCS stack appropriately failing the TCS's that
- # couldn't be completed. Then releases the target, and exits
- # the script
- # Parameters: pFailReason - Reason for failing TCS.
- # pSuiteComplete - Completion Code for Suite.
- # Returns: Nothing
- # Examples: CleanAbort();
- # Assumptions: None
- #========================================================================
- Calls: ClearStack(), SuiteEnd(), gExitVU
- Is called by: GatherTargetCrashLog(), TCSEnd(), ApplicationVerification()
-
-
- Task: ApplicationVerification(pAppVerify := 0)
- Library: TCS.Lib
- Header:
- #########################################################################
- # ApplicationVerification(pAppVerify)
- #========================================================================
- # Author: KTA
- # Description: Verify that the current Application is the same as the global
- # gAppTitle. If not successfull, Abort of script will occur thru
- # ExceptionDispatcher().
- # Parameters: pAppVerify - 1 := will make the check
- # 0 := will not make the check
- # Returns: nothing
- # Examples: ApplicationVerification(1);
- # Assumptions: None
- #========================================================================
- Calls: LogStr(), _Match(), ExceptionDispatcher(), KeyEq(), CleanAbort(),
- Is called by: TCSStart()
-
-
- Task: TCTrackingOrNot(pTCID)
- Library: TCS.Lib
- Header:
- #########################################################################
- # TCTrackingOrNot(pTCID)
- #========================================================================
- # Author: KTA
- # Description: Determines if individual TCSes should be tracked or not by
- # comparing the value of <pTCID> with the global gTCTracking.
- # If gTCTracking = 0 - no Test Cases will be tracked.
- # If gTCTracking = 1 - all Test Cases will be tracked.
- # If gTCTracking = <list> - only the Test Cases that have a pTCID
- # which is in the list will be tracked.
- #
- # Parameters: pTCID - The pTCID from a call to TCSStart and/or TCSEnd
- # Returns: 0 - don't perform Test Case tracking
- # 1 - perform Test Case tracking
- # Examples: TCTrackingOrNot("Performance");
- # Assumptions:
- #========================================================================
- Calls:
- Is called by: TCSStart(), TCSEnd()
-
-
- Task: CheckforSystemFailure()
- Library: TCS.Lib
- Header:
- #########################################################################
- # CheckforSystemFailure()
- #========================================================================
- # Author: KTA
- # Description: Check for a system failure and calls Logs a testcase there was one.
- # Parameters: none
- # Returns: Nothing - But will call TCSEnd with the suitebailflag set, so
- # the suite will be ended if there was a system crash.
- # Examples: CheckforSystemFailure();
- # Assumptions: none
- # Called by suiteEnd to insure that if a crash occurred after
- # the last TCS that the data in Phoenix will represent what happened.
- #========================================================================
- Calls: _match(), LogStr(), DefaultCrashHandler()
- Is called by: SuiteEnd(), TCSEnd()
-
-
- Task: ExitVU()
- Library: TCS.Lib
- Header:
- #########################################################################
- # ExitVU()
- #========================================================================
- # Author: KTA
- # Description: This task makes the built in VU task Exit. The purpose
- # of defining this as a task is so we can use a task
- # reference to this task- gExitVu. This way we can default
- # our Exception Handling task to call the task reference gExitVU
- # and thus exit. If others do not want to exit they can redefine
- # the task reference to what ever task they prefer.
- # Parameters: None
- # Returns: Nothing
- # Examples: ExitVU(); or to use the task reference - Call(global gExitVU);
- # Assumptions: Note: gExitVU is defined in Globals.lib. If you want to
- # override this task reference please do not modify Globals.Lib,
- # override the it by redefining it in Custom.Lib.
- #########################################################################
- Calls:
- Is called by:
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: Text.Lib
- Calls: "Font.Lib","String.Lib", "ExceptionHandling.Lib";
-
-
-
- Task: TypeWord(pNumChars := 'Random')
- Library: Text.Lib
- Header:
- #########################################################################
- # TypeWord(pNumChars := 'Random')
- #=======================================================================
- # Author: KTA
- # Description: Will type a string of random characters <pNumChars>
- # in length.
- # Parameters: pNumChars - Number of characters in the 'word' default
- # is random length from 1 to 10 characters.
- # Example: TypeWord();
- #=======================================================================
- Calls: RandomString(), _Type()
- Is called by: TypeSentence()
-
-
- Task: TypeSentence(pNumWords := 20)
- Library: Text.Lib
- Header:
- #########################################################################
- # TypeSentence(pNumWords := 20)
- #=======================================================================
- # Author: KTA
- # Description: Will type a sentence of random character strings <pNumWords>
- # in length.
- # Parameters: pNumWords - Number of words in the sentence (default is 20)
- # Example: TypeSentence();
- #=======================================================================
- Calls: TypeWord(), _Type()
- Is called by: TypeParagraph()
-
-
- Task: TypeParagraph(pNumSentences := 6, pObjectNumber := '')
- Library: Text.Lib
- Header:
- #########################################################################
- # TypeParagraph(pNumSentences := 6)
- #=======================================================================
- # Author: KTA
- # Description: Will type a paragraph of sentences of random character strings <pNumSentences>
- # in length.
- # Parameters: pNumSentences - Number of sentences in the paragraph (default is 6)
- # Example: TypeParagraph();
- #=======================================================================
- Calls: _Type(), SetFontParams(), TypeSentence()
- Is called by:
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: TimingBasics.lib
- Calls: "Utility.Lib", 'UserInterface.Lib', 'IvyOperations.Lib', 'TCS.Lib',
- "ExceptionHandling.Lib", 'Ivy.vulib';
-
-
-
- Task: InstallVUTimingMethod()
- Library: TimingBasics.lib
- Header:
- #########################################################################
- # InstallVUTimingMethod()
- #=======================================================================
- # Author: KTA
- # Description: Initializes the task references required to complete
- # performance testing utilizing VU.
- # Parameters: none
- # Returns: Nothing
- # Example: InstallVUTimingMethod();
- # Assumptions This task must be called prior to doing any performance
- # testing with SPEC S&L
- #=======================================================================
- Calls:
- Is called by: TimeFontTesting()
-
-
- Task: RemoveVUTimingMethod()
- Library: TimingBasics.lib
- Header:
- #########################################################################
- # RemoveVUTimingMethod()
- #=======================================================================
- # Author: KTA
- # Description: Removes the the task references required to complete
- # performance testing utilizing VU.
- # Parameters: none
- # Returns: Nothing
- # Example: RemoveVUTimingMethod();
- # Assumptions This task can be called after to doing any performance
- # testing with SPEC S&L you want to remove any effects of
- # the performance testing.
- #=======================================================================
- Calls:
- Is called by: TimeFontTesting()
-
-
- Task: InstallIVTimingMethod()
- Library: TimingBasics.lib
- Header:
- #########################################################################
- # InstallIVTimingMethod()
- #=======================================================================
- # Author: KTA
- # Description: Initializes the task references required to complete
- # performance testing utilizing IVY.
- # Parameters: none
- # Returns: Nothing
- # Example: InstallIVTimingMethod();
- # Assumptions This task must be called prior to doing any performance
- # testing with IVY
- #=======================================================================
- Calls:
- Is called by: TimeCutPaste(), TimeSaveAs(), TimeOpenFile()
-
-
- Task: RemoveIVTimingMethod()
- Library: TimingBasics.lib
- Header:
- #########################################################################
- # RemoveIVTimingMethod()
- #=======================================================================
- # Author: KTA
- # Description: Removes the the task references required to complete
- # performance testing utilizing IVY.
- # Parameters: none
- # Returns: Nothing
- # Example: RemoveIVTimingMethod();
- # Assumptions This task can be called after to doing any performance
- # testing with IVY and you want to remove any effects of
- # the performance testing.
- #=======================================================================
- Calls: _Ivy()
- Is called by: TimeCutPaste(), TimeSaveAs(), TimeOpenFile()
-
-
- Task: StartTimerVU()
- Library: TimingBasics.lib
- Header:
- #########################################################################
- # StartTimerVU
- #=======================================================================
- # Author: KTA/DM
- # Description: Begin the Timer with VU
- # Parameters: none
- # Returns: none
- # Example: StartTimerVU();
- #
- # StartTimer will get called many more times than are actually timed.
- # Timing will occur only if StopTimer is called and global gTimedEvent is TRUE
- # gTimedEvent should also be set to the title of the timed test.
- #=======================================================================
- Calls: Timer(), gStartTimerVUHook
- Is called by:
-
-
- Task: StopTimerVU(polling := 1, specifier := '', pStopTimerHook := 0)
- Library: TimingBasics.lib
- Header:
- #########################################################################
- # StopTimerVU(polling := 1, specifier := '', pStopTimerHook := 0)
- #=======================================================================
- # Author: DM/KTA/JH
- # Description: subtracts the last time saved by StartTimerVU from the current time
- # and outputs the event name and the elapsed seconds
- # Parameters: polling, specifier see Polling()
- # pStopTimerHook - name of custom task defined in calling script
- # Returns: Elapsed time in secs if success, 0 if failure
- # Example: ETime(time1, time2);
- #=======================================================================
- Calls: Polling(), Timer(), TimedEventDescription(), pStopTimerHook, gStopTimerVUHook1,
- ETime(), LogPerformanceResults(), gStopTimerVUHook2,
- Is called by: TimeFontTesting()
-
-
- Task: Polling(PollMethod := 0, specifier := '')
- Library: TimingBasics.lib
- Header:
- #########################################################################
- # Polling(PollMethod, Specifier)
- #=======================================================================
- # Author: KTA
- # Description: Polls until target machine is available or until specifier
- # is located/gone.
- # Parameters: polling <> 0 poll before completing
- # specifier = '' match the target when polling
- # specifier <> '' & polling > 0
- # poll until the specifier is matched
- # specifier <> '' & polling < 0
- # poll until the specifier is not matched
- # Returns:
- # Example: Polling(1, {[window t:'Untitled' o:2]});
- #=======================================================================
- Calls: ExceptionDispatcher(), _matchBoolean(), FindWindow(),
- Is called by: StopTimerVU()
-
-
- Task: StartTimerIV()
- Library: TimingBasics.lib
- Header:
- #########################################################################
- # StartTimerIV()
- #=======================================================================
- # Author: KTA
- # Description: Calls IVStartWaitForImage() and sets a variable <gStartTimerIV)
- # to the current the current time in milliseconds. Note: IVStopWaitForImage()
- # is called first in case IVStartWaitForImage() has already been called.
- # Parameters: None
- # Returns: Nothing - but sets gStartTimerIV to the currenttime in Milliseconds
- # Example: StartTimerIV();
- # Assumptions Ivy exists on the target machine and has been initialized.
- #=======================================================================
- Calls: _Ivy(), gStartTimerIVHook
- Is called by: PerformScroll()
-
-
- Task: StopTimerIV(pWaitTime := 10, pStopTimerHook := 0)
- Library: TimingBasics.lib
- Header:
- #########################################################################
- # StopTimerIV()
- #=======================================================================
- # Author: KTA
- # Description: Calls IVGetTimeFound() and sets a variable <endTime>
- # to the current the current time in milliseconds. It then
- # calls IVSubtractTimes() to get the difference between global
- # <gStartTimerIV> and <endTime>. Then the IV and appleEvent overhead
- # is subtracted.
- # Parameters: pWaitTime - Time to wait this can be longer than it takes the image to
- # appear, but must not be shorter.
- # pStopTimerHook - name of custom task defined in calling script
- #
- # Returns: NetTime2 - success, difference between gStartTimerIV and Endtime with overhead
- # subtracted.
- # 0 - failure
- # Example: StopTimerIV();
- # Assumptions Ivy exists on the target machine and has been initailized.
- # Also requires that a call to StartTimerIV() was made prior to
- # calling this routine.
- #=======================================================================
- Calls: IVGetTimeFound(), _Ivy(), TimedEventDescription(), pStopTimerHook,
- gStopTimerIVHook1, FormatMilliSeconds(), LogPerformanceResults(),
- gStopTimerIVHook2
- Is called by: TimeCutPaste(), PerformScroll()
-
-
- Task: LocateTheString( pTheRect, theString := "Stop", theFont := "Geneva",
- theSize := 12, theStyle := 0 )
- Library: TimingBasics.lib
- Header:
- #########################################################################
- # LocateTheString( pTheRect, theString, theFont, theSize, theStyle )
- #=======================================================================
- # Author: KTA
- # Description: Makes a call to IVLocateString() to locate a string with the attributes
- # of the parameters and returns the rect of the found string.
- # Parameters: pTheRect - the rect to begin looking for the string in.
- # theString - the actual text of the string to look for.
- # theFont - the font title of theString.
- # theSize - the size of theString.
- # theStyle - the style of theSting.
- # Returns: the rect of theString that was found on target machine.
- # Example: LocateTheString({0,0,480, 640}, 'Hello World', 'Times', 10, 0);
- # Assumptions Ivy exists on the target machine and has been initialized.
- #=======================================================================
- Calls: _Ivy()
- Is called by: TimeCutPaste(), TimeScrolling()
-
-
- Task: FormatMilliSeconds(pTimeInMilliseconds := '')
- Library: TimingBasics.lib
- Header:
- #########################################################################
- # FormatMilliSeconds( pTimeInMilliseconds )
- #=======================================================================
- # Author: KTA
- # Description: Formats a time value in milliseconds by adding a decimal
- # point to seperate the integer portion from the fractional
- # portion.
- # Parameters: pTimeInMilliseconds - a string or integer which is a time
- # value in milliseconds.
- # Returns: String - Formated value.
- # Example: x := FormatMilliSeconds('76543');
- #=======================================================================
- Calls: NumToStr(),
- Is called by: StopTimerIV()
-
-
- Task: LogPerformanceResults(pResultCode := '', pErrStr := '', pTCSVal := 0,
- pTCSStr := '', pCommentStr := '', pExceptionFlag := '')
- Library: TimingBasics.lib
- Header:
- #########################################################################
- # LogPerformanceResults()
- #========================================================================
- #
- # Author: ML
- # Description: Wrapper task for logging a performance result
- # Parameters: pResultCode, pErrStr, pTCSVal, pTCSStr, pCommentStr, pExceptionFlag
- # - see TCSEnd()
- # Returns: none
- # Examples: LogPerformanceResults()
- #========================================================================
- Calls: TCSStart(), TCSEnd(),
- Is called by: StopTimerVU(), StopTimerIV()
-
-
- Task: TimedEventDescription()
- Library: TimingBasics.lib
- Header:
- #########################################################################
- #
- # TimedEventDescription()
- #========================================================================
- #
- # Author: ML
- # Description: Text description of timed event from gTimedEvent
- # Parameters: none
- # Returns: Text description of timed event
- # Examples: TimedEventDescription()
- #========================================================================
- Calls:
- Is called by: StopTimerVU(), StopTimerIV()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: TimingOperations.lib
- Calls: "UserInterface.lib", "Font.Lib", "Ivy.vulib", "TimingBasics.Lib",
- "StandardFile.Lib", "WorldReady.Lib", "Output.Lib", "ExceptionHandling.Lib",
- "IvyOperations.Lib";
-
-
- Task: GetProcessListIconRect()
- Library: TimingOperations.lib
- Header:
- #########################################################################
- # GetProcessListIconRect()
- #=======================================================================
- # Author: KTA
- # Description: Returns the rect of the application icon for the process list menu.
- # Parameters: none
- # Returns: Returns the rect of the application icon for the process list menu.
- # Example: GetProcessListIconRect();
- # Assumptions Processlist is the farthest menu to the right.
- #=======================================================================
- Calls: ExceptionDispatcher(),
- Is called by:
-
-
- Task: GetAppleMenuIconRect()
- Library: TimingOperations.lib
- Header:
- #########################################################################
- # GetAppleMenuIconRect()
- #=======================================================================
- # Author: KTA
- # Description: Returns the rect of the Apple icon for the Apple menu.
- # Parameters: none
- # Returns: Returns the rect of the Apple icon for the Apple menu.
- # Example: GetAppleMenuIconRect();
- # Assumptions Apple menu is the farthest menu to the left.
- #=======================================================================
- Calls: ExceptionDispatcher()
- Is called by:
-
-
- Task: GetFirstTwoMenusRect()
- Library: TimingOperations.lib
- Header:
- #########################################################################
- # GetFirstTwoMenusRect()
- #=======================================================================
- # Author: KTA
- # Description: Returns the rect of the Apple menu and the file menu
- # Parameters: none
- # Returns: Returns the rect of the Apple menu and the file menu.
- # Example: GetFirstTwoMenusRect();
- # Assumptions .
- #=======================================================================
- Calls: ExceptionDispatcher()
- Is called by: TimeSaveAs(), TimeOpenFile()
-
-
- Task: TimeCutPaste(pNumTimes := 1)
- Library: TimingOperations.lib
- Header:
- #########################################################################
- # TimeCutPaste()
- #=======================================================================
- # Author: KTA
- # Description: Will cut and paste the entire contents of a document and time how long
- # the operations take.
- # Parameters: pNumTimes - number of times to time the operation.
- # Returns: nothing
- # Example: TimeCutPaste();
- # Assumptions : Requires 'STOP' tag at bottom of document in Geneva, 12 point, plain
- # Also requires :
- # keyEq('a') will select all
- # keyEq('x') will cut
- # keyEq('v') will paste
- # and that pasting will display the end of the document
- # (where 'Stop' should exist).
- #=======================================================================
- Calls: InitIvy(), KeyEq(), DialogCheck(), LogStr(), ExceptionDispatcher(),
- LocateTheString(), _Ivy(), InstallIVTimingMethod(), StopTimerIV(),
- RemoveIVTimingMethod(), QuitIvy()
- Is called by:
-
-
- Task: TimeSaveAs(pFileName := '',pSaveMI := {8,2})
- Library: TimingOperations.lib
- Header:
- #########################################################################
- # TimeSaveAs(pFileName, pSaveMI)
- #=======================================================================
- # Author: KTA
- # Description: Sets up the requirements for timing utilizing IVY and times
- # how long it takes an application to save a file. Then removes
- # the all global varibles that are defined in order to do timing.
- # Parameters: pFileName - FileName for the document you want to save.
- # pSaveMI - 'Save As…' menuitem descriptor (ordinality contained in a list)
- # Returns: Nothing
- # Example: TimeSaveAs('@TestDoc', {7,2});
- # Assumptions Processlist is the farthest menu to the right.
- #=======================================================================
- Calls: InitIvy(), GetFirstTwoMenusRect(), _Ivy(), InstallIVTimingMethod(),
- SwitchScriptToUS(), SaveAs(), SwitchScriptBackToOrig(), RemoveIVTimingMethod(),
- QuitIvy()
- Is called by:
-
-
- Task: TimeOpenFile(pFileName := '', pOpenMI := {2,2})
- Library: TimingOperations.lib
- Header:
- #########################################################################
- # TimeOpenFile(pFileName, pOpenMI)
- #=======================================================================
- # Author: KTA
- # Description: Sets up the requirements for timing utilizing IVY and times
- # how long it takes an application to open a file. Then removes
- # the all global varibles that are defined in order to do timing.
- # Parameters: pFileName - FileName for the document you want to save.
- # pOpenMI - 'Open' menuitem descriptor (ordinality contained in a list)
- # Returns: Nothing
- # Example: TimeOpenFile('@TestDoc', {2,2});
- # Assumptions Processlist is the farthest menu to the right.
- #=======================================================================
- Calls: InitIvy(), GetFirstTwoMenusRect(), _Ivy(), SwitchScriptToUS(),
- InstallIVTimingMethod(), openFile(), SwitchScriptBackToOrig(),
- RemoveIVTimingMethod(), QuitIvy()
- Is called by:
-
-
- Task: TimeFontTesting(numTimes := 1, pFontRecord := {})
- Library: TimingOperations.lib
- Header:
- #########################################################################
- # TimeFontTesting(numTimes, pFontRecord)
- #========================================================================
- # Author: KTA
- # Description: Times the selection of Fonts, Sizes and Styles. Normally this
- # task will be called after all text has been selected.
- # Parameters: numTimes - number of times to perform the timed tests.
- # pFontRecord - (optional) makes it possible to pass in a
- # fontRecord to define which fonts, sizes and styles
- # will be selected and therefore timed. FontRecords
- # take the following form:
- # {'FontName', 'SizeName',{'StyleName1', 'StyleName2', etc}}
- # Returns: nothing
- # Example: TimeFontTesting(4, {'Times', '12',{'Bold', 'Italics'}});
- # TimeFontTesting(2, );
- # Assuptions: a
- #========================================================================
- Calls: InstallVUTimingMethod(), RandomFontRecords(), FindMenu(), SelectmenuItem(),
- StopTimerVU(), RemoveVUTimingMethod()
- Is called by:
-
-
- Task: SetUpDocumentWindow(pWindowTitle,pTopScreenLocation := {0,20})
- Library: TimingOperations.lib
- Header:
- #########################################################################
- # SetUpDocumentWindow()
- #========================================================================
- # Author: MDS
- # Description: Positions the title bar of a document at location {0,20}
- # and resizes the document to aconstant size.
- # (according to the main screen size)
- # Assumtions: the document window is the top window (ordinality: 1)
- # Parameters: pWindowTitle - Title of the docuemnt to resize
- # Returns: nothing
- # Example:
- #========================================================================
- Calls: ExceptionDispatcher(), findWindow(), DragWindow(), SizeWindow()
- Is called by: TimeScrolling()
-
-
- Task: PerformScroll( pDocumentName, pEndPointRect, pWhichDirection, pWaitForScroll,
- pScrollByLine, pScrollCoords)
- Library: TimingOperations.lib
- Header:
- #########################################################################
- # PerformScroll( pEndPointRect, pWhichDirection := 1)
- #========================================================================
- # Author: MDS
- # Description: Uses Ivy to time how long it takes to scroll a document from
- # top to bottom or viceversa
- # Parameters: pDocumentName - name of the document in which to time scrolling
- # pEndPointRect - list with the points of the rectangle containing
- # an image of the end point string
- # pWhichDirection - in which direction to time scrolling:
- # 0 - Up, 1 - Down
- # pWaitForScroll - Time to wait with scroll arrow held down Note:
- # this should be longer than the scroll should take
- # so IVY has time to locate the image.
- # pScrollByLine - whether to scroll line by line or screen by screen
- # 1 - line by line
- # 0 - screen by screen
- # pScrollCoords - 2 element list of coordinates of scroll point
- # Returns: The actual time that takes to scroll
- # Example:
- # Assumptions: 1- The document contains a string which indicates the end point
- # 2- The string should be created with at least one space at the
- # begining and one space at the end, otherwise the cursur beam
- # will prevent Ivy from locating the end point string.
- #
- #========================================================================
- Calls: gScrollWindow, ScrollWindow(), logstr(), _move(), StartTimerIV(),
- _pressMouse(), _releasemouse(), StopTimerIV()
- Is called by: TimeScrolling()
-
-
- Task: TimeScrolling( pDocumentName := "", pIterations := 1, pWhichDirection := 1,
- pWaitForScroll := 35, pHowEndScroll := "Stop", pScrollByLine :=1)
- Library: TimingOperations.lib
- Header:
- #########################################################################
- # TimeScrolling( pDocumentName, pIterations, pWhichDirection )
- #========================================================================
- # Author: MDS
- # Description: Times the scrolling of a document
- # Parameters: pDocumentName - name of the document in which to time scrolling
- # pIterations - how many iterations to time scrolling
- # pWhichDirection - in which direction to time scrolling:
- # 0 - Up, 1 - Down
- # pWaitForScroll - Time to wait with scroll arrow held down Note:
- # this should be longer than the scroll should take
- # so IVY has time to locate the image.
- # pHowEndScroll - How IVY will know when the scroll is complete
- # {string} - scroll is complete when {string} appears
- # - must be formatted in 12 point Geneva!
- # 1 - scroll is complete when thumbnail is at bottom of
- # scroll bar
- # pScrollByLine - whether to scroll line by line or screen by screen
- # 1 - line by line
- # 0 - screen by screen
- # Returns: The actual time that takes to scroll
- # Example:
- #========================================================================
- Calls: SetUpDocumentWindow(), InitIvy(), gScrollWindow, ScrollWindow(),
- ExceptionDispatcher(), logstr(), LocateTheString(), _Ivy(), PerformScroll(),
- QuitIvy()
- Is called by:
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: UserInterface.lib
- Calls: "Geometry.lib","String.Lib","Output.lib","TCS.lib",
- "StandardFile.lib", "ExceptionHandling.Lib";
-
-
-
- Task: SelectMenuItem(pMenu1, pMenu2 := "", pMenu3 := "")
- Library: UserInterface.lib
- Header:
- ########################################################################
- # SelectMenuItem(pMenu1, pMenu2, pMenu3)
- #=======================================================================
- # Author: KTA
- # Description: Selects the menu item by its title or ordinality.
- # All parameters are expected to be the same type.
- # Parameters: pMenu1 := Menu item to be selected.
- # pMenu2 := Menu name if non-hier menu and
- # Level 2 menu item if hier menu.
- # pMenu3 := "" if non-hier menu.
- # Menu name if hier menu.
- # Returns: menuTitle - MenuItem name that selection was successful
- # 0 - Couldn't select menu item
- # Notes: It is not mandatory to specify input parameters 'pMenu2'
- # or 'pMenu3'. In that case, default value, "",
- # will be used.
- #=======================================================================
- Calls: _matchBoolean(), _match(), LogStr(), gPreSelectMenuItemHook,
- _select(), gPostSelectMenuItemHook, DialogCheck()
- Is called by: Scrapbook(), DoSetUpApp(), SetLineMenuItems(),
- HelpBalloons(), SetFont(), SetStyle(), SetSize(),
- Quit(), LaunchByAppleMenu(), AboutBox(), PrintSample(),
- PageSetup(), Printer(), SelectAll(), SaveAs(), OpenFile(),
- Revert(), CancelStandardFile(), Save(), TimeFontTesting(),
- CloseWindow(), DoWPTools(), TypeTradChineseString()
-
-
- Task: SelectPopUpMenuItem(pPopUpMenuItemSpecifer, pPopupMenuSpecifier)
- Library: UserInterface.lib
- Header:
- ########################################################################
- # SelectPopUpMenuItem(pPopUpMenuItemSpecifer, pPopupMenuSpecifier)
- #=======================================================================
- # Author: KTA
- # Description: Selects the popUp menu item <pPopUpMenuItemSpecifer>
- # contained in the popUp menu <pPopupMenuSpecifier>.
- # Parameter types can be mixed.
- # Parameters: pPopUpMenuItemSpecifer := PopUp menu item to be selected.
- # Can be string, integer, descriptor
- # pPopupMenuSpecifier := PopUp menu which contains <pPopUpMenuItemSpecifer>.
- # Can be string, integer, descriptor
- # Returns: 1 - successful
- # 0 - Couldn't select menu item
- # Notes: Only works with Popup menuitems that VU recognizes.
- #=======================================================================
- Calls: _match(), _select(), LogStr()
- Is called by:
-
-
- Task: FindMenu(pTheMenuItem)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # FindMenu(pTheMenuItem)
- #=======================================================================
- # Author: KTA
- # Description: Returns the Menu(s) in which <pTheMenuItem> is contained.
- # Parameters: pTheMenuItem := Title of the menuitem to be searched for.
- # Returns: 0 - Can't match <pTheMenuItem>.
- # {theMenu,""} - for a nonHierarchical menu.
- # {theHMenuItem, theMenu} - if its hierarchical.
- # Example: MyMenu := FindMenu('Paste');
- #=======================================================================
- Calls: _match(), ExceptionDispatcher(),
- Is called by: SetFont(), SetStyle(), SetSize(), TimeFontTesting()
-
-
- Task: KeyEq(pKeyEquiv, pOtherkey := 0, pNumTimes := 1)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # KeyEq(pKeyEquiv,pOtherkey, pNumTimes)
- #========================================================================
- # Author: KTA
- # Description: This routine will select the Keyboard Equiv <pKeyEquiv>
- # Parameters: pKeyEquiv - string holding character to be typed with
- # command key down.
- # pOtherkey - integer - representing special keys to hold
- # down in conjunction with the command key
- # 1 - Shift key
- # 2 - Option key
- # 3 - Control key
- # pNumTimes - integer - representing number of times to type keyEq.
- # Returns: None
- # Examples: KeyEq("q");
- #========================================================================
- Calls: LogStr(), _pressKey(), gPreKeyEqHook, _type(), _releaseKey
- Is called by: Scrapbook(), FinderNavigate(), Quit(), LaunchByTypeSelect(),
- VerifyAppPriorToLaunch(), OpenFile(), CancelStandardFile(),
- Save(), ApplicationVerification(), TimeCutPaste(),
- CloseWindow(), DialogDismisser(), DismissDialog(),
- SwitchScript()
-
-
- Task: TestWindow(pSpecifier := 0, pFunctionList := 0, pRestoreWindow := 0,
- pNumTimes := 1, pDragXY := {0,20})
- Library: UserInterface.lib
- Header:
- #########################################################################
- # TestWindow(pSpecifier,pFunctionList,pRestoreWindow,pNumTimes,pDragXY)
- #=======================================================================
- # Author: NJV
- #
- # Description: Performs the specified functions as defined in the input
- # parameter pFunctionList. If pFunctionList is not passed,
- # or is passed as 0, then the following operations are
- # performed on the window specified by input parameter
- # pSpecifier. The default behavior will perform the
- # following behaviors on the frontmost window* (see *NOTE).
- # Listed below is the list of function numbers and a brief
- # description of what that particular function does:
- #
- # #0 Complete Window Test
- # Performs functions 1 through 17
- # (17 is done twice - zoom & zoom back)
- # #1 Resize to random width and height.
- # #2 Attempt resize to 20,20 (should not allow it)
- # #3 Scroll the vertical scroll bar to random location.
- # #4 Scroll the vertical scroll bar to end location.
- # #5 Scroll the vertical scroll bar to beginning location.
- # #6 Scroll the vertical scroll bar to original location.
- # #7 Scroll the horizontal scroll bar to random location.
- # #8 Scroll the horizontal scroll bar to end location.
- # #9 Scroll the horizontal scroll bar to beginning location.
- # #10 Scroll the horizontal scroll bar to original location.
- # #11 Resize window to largest possible and then
- # #12 Resize back to smallest window size
- # #13 Size window across screen border to second screen
- # (if 2 screens) and back
- # #14 Drag window across screen border and back
- # #15 Drag random location and back to original location
- # #16 Drag window back to original location.
- # #17 Zoom.
- # #18 Complete Window Size Test
- # Performs functions 1,2,11,12, and 13
- # #19 Complete Window Scroll Test
- # Performs functions 3,4,5,6,7,8,9, and 10
- # #20 Complete Window Drag Test
- # Performs functions 14,15, and 16
- # #21 Complete Window Zoom Test
- # Performs function 17 twice (zoom - zoom back)
- # #22 A More Complete Window Scroll Test
- # Performs functions 2,3,4,5,6,7,8,9, and 10.
- # This is the same as #19 except it sizes the
- # window to the smallest possible size. This
- # is better in that it is more likely for the
- # scrollbars to be active.
- # #23 A More Complete Window Drag Test
- # Performs functions 2,14,15, and 16
- # This is the same as #20 except it sizes the
- # window to the smallest possible size. This
- # is better in that it is more likely for the
- # window to be able to be dragged across screen
- # boundaries.
- #
- # Parameters: pSpecifier - Title or Ordinality or partial window descriptor
- # of window to be tested
- # If this parameter is not passed, default
- # behavior of Tasks will be used (generally the
- # frontmost window - see *NOTE below)
- #
- # pFunctionList - A list containing the functions to be
- # executed and the number of times to exercize
- # each function. The functions will be executed
- # in the order that they are defined. The default
- # is to execute all tests once. The pFunctionList
- # parameter can have the following formats:
- #
- # integer:
- # Number of a single test to run once.
- # Functions are numbered above.
- # 0 to execute full sequence once.
- #
- # list of integers:
- # A list of test numbers to run -
- # each test will be run once and
- # in the same order that they appear
- # in the list.
- #
- # list of lists:
- # A list of {test#,#times} lists
- # where test# is the number of the
- # test and #times is the number of
- # times to execute that test. Each
- # list will be processed in order.
- # If an item in the main list is an
- # integer and not a list, that test
- # number will be executed once.
- #
- # pRestoreWindow - 1 to restore window to original size,
- # location, and scrollbar status.
- # 0 not to restore window
- #
- # pNumTimes - integer for number of times to execute test
- #
- # pDragXY - Upper Left-Top corner to drag window to
- #
- # Returns: 0 - Couldn't find specified window
- # 1 - Executed OK
- #
- # Assumptions: None
- #
- #========================================================================
- Calls: FindWindow(), SelectWindow(), _matchBoolean(), _collect(), LogStr(),
- DragWindow(), resetWindowFunctionList(), WindowFunction(), ResetWindow()
- Is called by: DoWindow()
-
-
- Task: WindowFunction(pSpecifier, pTheFunction, pDragXY, pDestinationPoint)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # WindowFunction(pSpecifier, pTheFunction, pDragXY,pDestinationPoint)
- #=======================================================================
- # Author: NJV
- # Description: Performs the specified function defined in the input
- # parameter pTheFunction to the window specified by pSpecifier.
- # Listed below is the list of function numbers and a brief
- # description of what that particular function does:
- #
- # #1 Resize to random width and height.
- # #2 Attempt resize to 20,20 (should not allow it)
- # #3 Scroll the vertical scroll bar to random location.
- # #4 Scroll the vertical scroll bar to end location.
- # #5 Scroll the vertical scroll bar to beginning location.
- # #6 Scroll the vertical scroll bar to original location.
- # #7 Scroll the horizontal scroll bar to random location.
- # #8 Scroll the horizontal scroll bar to end location.
- # #9 Scroll the horizontal scroll bar to beginning location.
- # #10 Scroll the horizontal scroll bar to original location.
- # #11 Resize window to largest possible
- # #12 Resize back to smallest window size
- # #13 Size window across screen border to second screen
- # (if 2 screens) and back
- # #14 Drag window across screen border and back
- # #15 Drag window to random location.
- # #16 Drag window to location specified by pDestinationPoint.
- # #17 Zoom.
- # #18 Complete Window Size Test
- # Performs functions 1,2,11,12, and 13
- # #19 Complete Window Scroll Test
- # Performs functions 3,4,5,6,7,8,9, and 10
- # #20 Complete Window Drag Test
- # Performs functions 14,15, and 16
- # #21 Complete Window Zoom Test
- # Performs function 17 twice (zoom - zoom back)
- # #22 A More Complete Window Scroll Test
- # Performs functions 2,3,4,5,6,7,8,9, and 10
- # This is the same as #19 except it sizes the
- # window to the smallest possible size. This
- # is better in that it is more likely for the
- # scrollbars to be active.
- # #23 A More Complete Window Drag Test
- # Performs functions 2,14,15, and 16
- # This is the same as #20 except it sizes the
- # window to the smallest possible size. This
- # is better in that it is more likely for the
- # window to be able to be dragged across screen
- # boundaries.
- #
- # Parameters: pSpecifier - Title of window to be tested
- #
- # pTheFunction - The number of the test to run
- #
- # pDragXY - Left-Top point (list of {left,top}) to drag
- # window to. (used if pTheFunction = 13 or 14)
- #
- # pDestinationPoint - Left/Top point (list of {left,top}) of
- # original window (used if pTheFunction = 16)
- #
- # Returns: 0 - Couldn't perform specified Task
- # 1 - Executed OK
- #
- # Assumptions: None.
- #
- # *NOTE: The TestWindow() function provides much more versatility
- # than this routine. WindowFunction is called by TestWindow.
- #========================================================================
- Calls: LogStr(), resetWindowFunctionList(), WindowFunction(), SizeWindow(),
- GetVHScrollBars(), ScrollWindow(), FindWindow(), ExceptionDispatcher(),
- SizeAcrossScreens(), DragWindow(), ZoomWindow()
- Is called by: TestWindow(), WindowFunction()
-
-
- Task: ResetWindowFunctionList(pFunctionList)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # ResetWindowFunctionList(pFunctionList)
- #========================================================================
- # Author: KTA
- # Description: This routine takes a window functionlist as a parameter and removes
- # any test which are specified as not available by the gDoWindowList global.
- # Parameters: pFunctionList - Initial function list
- # global gDoWindowList := {1,1,1,1};
- # Set each element to 1 or 0. Flag for performing DoWindows tests as follows:
- # Element: 1 - Sizing
- # 2 - Scrolling
- # 3 - Dragging
- # 4 - Zooming
- # Returns: Functiuon list after remove tests that aren't supported.
- # Examples: FunctionList := ResetWindowFunctionList({1,2,11,12,16,17});
- #========================================================================
- Calls:
- Is called by: TestWindow(), WindowFunction()
-
-
- Task: DragAcrossScreens(pSpecifier,pDragXY)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # DragAcrossScreens(pSpecifier,pDragXY)
- #========================================================================
- # Author: NJV
- # Description: If there are two screens present, this task will drag
- # the window specified by <pSpecifier> so that half of the
- # window is on the first screen and half of the window
- # is on the second screen.
- # Parameters: pSpecifier - title of window to drag
- # pDragXY - a list of two co-ordinates (left-top) pixel
- # to drag window to (i.e.{0,20} to avoid menu bar
- # on main screen).
- # Returns: 1 - successful
- # 0 - unsuccessful
- # Examples: DragAcrossScreens("Untitled",{0,20}).
- # Assumptions: None
- #========================================================================
- Calls: _match(), _MatchBoolean(), FindWindow(), TCSStart(), LogStr(),
- TCSEnd()
- Is called by: WindowFunction()
-
-
- Task: SizeAcrossScreens(pSpecifier, pDragXY)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # SizeAcrossScreens(pSpecifier,pDragXY)
- #========================================================================
- # Author: NJV
- # Description: If there are two screens present, this task will size
- # the window specified by <pSpecifier> (if there's a grow box)
- # so half of the window is on the first screen and half of
- # the window is on the second screen.
- # Parameters: pSpecifier - Descriptor of the window to size.
- # pDragXY - a list of two co-ordinates (left-top) pixel
- # to drag window to (i.e.{0,20} to avoid menu bar
- # on main screen).
- # Returns: 1 - successful
- # 0 - unsuccessful
- # Examples: SizeAcrossScreens("myWindow",{0,20}).
- # Assumptions: None
- #========================================================================
- Calls: _match(), _MatchBoolean(), FindWindow(), TCSStart(), SizeWindow(),
- LogStr(), ResetWindow(), DragWindow(), TCSEnd()
- Is called by: WindowFunction()
-
-
- Task: AdjustRectToScreen(pTheRect)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # AdjustRectToScreen(pTheRect)
- #========================================================================
- # Author: NJV
- # Description: This routine checks a rectangle to see if it is within
- # the screen, if any part of it is not, it will be
- # clipped so as to fit the screen. This is done by
- # comparing the coordinates of the rectangle with that of
- # the screen.
- # Parameters: pTheRect - holds the coordinates of the rectangle.
- # Returns: pTheRect - the coordinates of the clipped rectangle.
- # (if it was not completely within the screen)
- # or the coordinates of the original rectangle
- # (if it lies totally within the screen)
- # Examples: AdjustRectToScreen(Window.r).
- # Assumptions: All windows are no larger than the screen.
- #========================================================================
- Calls: _collect(),
- Is called by: CoverCompletely()
-
-
- Task: CoverCompletely (pFirstWindow, pSecondWindow)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # CoverCompletely(pFirstWindow,pSecondWindow)
- #========================================================================
- # Author: SMQ
- # Description: This routine determines whether or not one window
- # completely covers another. This is done by comparing
- # the coordinates of both windows.
- # Parameters: pFirstWindow - specifies the first window.
- # pSecondWindow - specifies the second window.
- # Returns: 1 - second window is completely covered by the first.
- # 0 - second window is partially or totally Uncovered.
- # Examples: CoverCompletely(window1,window2).
- # Assumptions: None
- #========================================================================
- Calls: FindWindow(), AdjustRectToScreen(), RectInRect()
- Is called by: UnCoverWindow()
-
-
- Task: ResetWindow(pTheWindow)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # ResetWindow(pTheWindow)
- #========================================================================
- # Author: NJV
- # Description: Resets the first window with a grow and zoom box to
- # the size and position of the input parameter wind
- # window descriptor.
- # Parameters: pTheWindow - window descriptor of original window.
- # Returns: 0 - error
- # 1 - no error
- # Examples: ResetWindow(pTheWindow).
- # Assumptions: None
- #========================================================================
- Calls: SelectWindow(), LogStr(), SizeWindow(), DragWindow(), ScrollWindow()
- Is called by: TestWindow(), SizeAcrossScreens()
-
-
- Task: SelectWindow(pSpecifier := 0)
- Library: UserInterface.lib
- Header:
- ########################################################################
- # SelectWindow(pSpecifier)
- #=======================================================================
- # Author: NJV
- # Description: This routine will select a window specified by
- # <pSpecifier>.
- # Parameters: pSpecifier - holds the title or ordinality or window descriptor
- # of window to select.
- # Returns: {theDesc} - Updated window descriptor - Selected window OK
- # 0 - Couldn't find window to select
- #=======================================================================
- Calls: FindWindow(), UnCoverWindow(), _select(), Logstr()
- Is called by: TestWindow(), ResetWindow(), CloseWindow()
-
-
- Task: UnCoverWindow(pSpecifier, pFrontWindow := 1)
- Library: UserInterface.lib
- Header:
- ########################################################################
- # UnCoverWindow(pSpecifier, pFrontWindow)
- #=======================================================================
- # Author: KTA
- # Description: This routine will move a window out of the way if it covers
- # our desired window.
- # Parameters: pSpecifier - holds the title or ordinality of window that is desired.
- # pFrontWindow - window that is in front of the desired one.
- # Returns: Nothing
- #=======================================================================
- Calls: FindWindow(), ExceptionDispatcher(), CoverCompletely(), DragWindow()
- Is called by: SelectWindow()
-
-
- Task: DragWindow(pHorizontalPixels := "Random", pVerticalPixels := "Random",
- pSpecifier := 0,pAbsolutely := 1)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # DragWindow(pHorizontalPixels, pVerticalPixels,pSpecifier,pAbsolutely)
- #========================================================================
- # Author: KTA
- # Description: This routine will drag the specified window.
- # <pHorizontalPixels> pixels horizontally (negative drags left)
- # and <pVerticalPixels> pixels vertically (negative drags up)
- # Parameters: pHorizontalPixels - Horizontal pixel offset to drag the window
- # pVerticalPixels - Vertical pixel offset to drag the window
- # pSpecifier - Window specifier
- # pAbsolutely - 1 if absolute drag
- # 0 if relative drag
- # Returns: 1 - Dragged window OK
- # 0 - Couldn't find window to drag
- #========================================================================
- Calls: getXYRandom(), FindWindow(), TCSStart(), _drag(), TCSEnd(), LogStr()
- Is called by: TestWindow(), WindowFunction(), DragAcrossScreens(),
- SizeAcrossScreens(), ResetWindow(), UnCoverWindow(),
- SetUpDocumentWindow()
-
-
- Task: SizeWindow(pPixelsWide:="random", pPixelsHigh:="random", pSpecifier := 0,
- pAbsolutely := 1)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # SizeWindow(pPixelsWide,pPixelsHigh,pSpecifier,pAbsolutely)
- #========================================================================
- # Author: KTA
- # Description: This routine will match and resize the specified window.
- # If only the <pPixelsWide> and <pPixelsHigh> parameters are
- # passed, the default behavior will size the first window
- # containing a grow and zoom box pAbsolutely. If no parameters
- # are passed, then the default behavior will generate random
- # coordinates on the main screen and resize the window
- # to an absolute size. If the user passes in the string
- # "random" for <pPixelsWide> and <pPixelsHigh> and passes 0 for
- # the pAbsolutely parameter (for a resize relative to current size),
- # then checks are performed to assure that new size will
- # not go off of the screen. If it does, the values will
- # be adjusted so that the largest the window can be sized
- # is to the border of the screen.
- # Parameters: pPixelsWide - the width to resize the window
- # pPixelsHigh - the height to resize the window
- # pSpecifier - title or ordinality of window to be sized
- # pAbsolutely - 1 if resize window absolute
- # 0 if resize window relative
- # Returns: 1 - Resized window OK
- # 0 - Couldn't resize window
- # Examples: SizeWindow(200,400);
- #========================================================================
- Calls: FindWindow(), TCSStart(), getXYRandom(), ExceptionDispatcher(),
- TCSEnd(), LogStr()
- Is called by: SetUpDocumentWindow(), WindowFunction(), SizeAcrossScreens(),
- ResetWindow()
-
-
- Task: ZoomWindow(pSpecifier:= 0)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # ZoomWindow(pSpecifier)
- #========================================================================
- # Author: KTA
- # Description: Selects the zoom box on the specified window. If no
- # parameters are passed, then the default behavior will
- # zoom the first window with a zoom box.
- # Parameters: pSpecifier - window specifier
- # Returns: 0 - Couldn't zoom the window
- # 1 - Zoomed the window OK
- #========================================================================
- Calls: FindWindow(), TCSStart(), ExceptionDispatcher(), TCSEnd(), LogStr(),
- Is called by: WindowFunction()
-
-
- Task: CloseWindow(pHowClose := 3,pOverWrite := 1,pSpecifier := 0,pNewDocName :="")
- Library: UserInterface.lib
- Header:
- #########################################################################
- # CloseWindow(pHowClose, pOverwrite, pSpecifier,pNewDocName)
- #========================================================================
- # Author: KTA/NJV/DMM
- # Description: This routine will close the specified window. If no
- # parameters are passed to this routine, the default behavior
- # will select the close box of the first window with a close box.
- # Parameters: pHowClose - 0 - tries all three ways noted below to close the
- # window (if needed)
- # 1 - tries to close window by selecting "Close" menu
- # item
- # 2 - tries to close window by typing "Close" menu
- # item's key equivalent
- # 3 - tries to close window by selecting window's
- # close box
- # pOverwrite - 0 - will select "No" from a save-changes dialog
- # if one appears when closing window
- # 1 - will select "Yes" to save changes
- # pSpecifier - window specifier
- # pNewDocName - string holding new document name - if pOverwrite
- # parameter is 1, then pNewDocName will be used for
- # naming the file.
- # Returns: 1 - Closed window OK
- # 0 - Couldn't find window to close
- #========================================================================
- Calls: FindWindow(), SelectWindow(), TCSStart(), SelectMenuItem(), _match(),
- KeyEq(), _close(), LogStr(), checkYesNo(), IsStandardFile(), SaveAs(),
- _matchBoolean(), TCSEnd()
- Is called by: Scrapbook(), DoFiles(), DoSetUpApp(), Quit(), CloseAllWindows()
-
-
- Task: ScrollWindow(pWhichScrollBar,pDesirePosition:=-1,pMaxPosition:=-1)
- Library: UserInterface.lib
- Header:
- ########################################################################
- # ScrollWindow(pWhichScrollBar,pDesirePosition,pMaxPosition)
- #=======================================================================
- # Author: KTA/NJV
- # Description: This routine will scroll the specified scrollbar on
- # the active window.
- # Parameters: pWhichScrollBar = 'H' - for horizontal scrollbar
- # = 'V' - for vertical scrollbar
- # <pDesirePosition><pMaxPosition> = the fraction pDesirePosition/pMaxPosition
- # Returns: 0 - Couldn't scroll the scroll bar
- # 1 - Scrolled the scroll bar
- # Examples: ScrollWindow('H',1,2) will scroll the horizontal bar 1/2
- # Assumptions: That the scrollbars are present. This routine collects
- # only the first two scroll bars, which are assumed to be
- # the horizontal and vertical scroll bars.
- # This routine is not 100% reliable.
- #=======================================================================
- Calls: GetVHScrollBars(), _match(), TCSStart(), ExceptionDispatcher(),
- LogStr(), TCSEnd()
- Is called by: HereToStartSelect(), HereToEndSelect(), SelectAll(),
- PerformScroll(), TimeScrolling(), WindowFunction(),
- ResetWindow()
-
-
- Task: GetVHScrollBars(pSpecifier := [window c:true g:true])
- Library: UserInterface.lib
- Header:
- ########################################################################
- # GetVHScrollBars()
- #=======================================================================
- # Author: NJV
- # Description: This routine will return the vertical and horizontal
- # scroll bars.
- # Parameters: pSpecifier - Window descriptor
- # Returns: 0 - Couldn't find scroll bars
- # {vertical,horizontal} - list of vertical and horizontal
- # scroll bars
- # Examples: scrollBars := GetVHScrollBars();
- # Assumptions: Top of vertical scroll bar is at a lower vertical value
- # that the horizontal (i.e. the top of vertical rect is smaller
- # than the top of the horizontal scroll bar's rect).
- #=======================================================================
- Calls: _collect(), LogStr(),
- Is called by: HereToStartSelect(), HereToEndSelect(), SelectAll(),
- WindowFunction(), ScrollWindow()
-
-
- Task: CloseAllWindows()
- Library: UserInterface.lib
- Header:
- #########################################################################
- # CloseAllWindows()
- #=======================================================================
- # Author: ML
- # Description: Closes all windows having a close box.
- # Parameters: None
- # Returns: Nothing
- # Assuptions: Windows have close boxes.
- #=======================================================================
- Calls: FindWindow(), CloseWindow()
- Is called by: Quit()
-
-
- Task: FindWindow(pSpecifier := "None", pBooleanFlag := false)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # FindWindow(pSpecifier)
- #========================================================================
- # Author: DM
- # Description: FindWindow will return the descriptor of the window
- # specified by the parameter pSpecifier.
- # Parameters: pSpecifier - if string, then it holds title of window
- # if integer, then it holds ordinality of window
- # if rect, create a fake window specfier with the
- # rect as the wind.r
- # if window descriptor will match window meeting
- # the specified traits e.g. [window t:'Mywind' o:2]
- # Pass 0 to get the first document window
- # pBooleanFlag - IF set will return true or false indicating the presence of
- # window specified by <pSpecifier>. Note: No window
- # descriptor will be returned.
- # Returns: 0 - Couldn't find the window
- # descriptor - Window descriptor that meets the specified match
- # for <pSpecifier>
- # Example: FindWindow(1);
- #========================================================================
- Calls: _matchBoolean(), _match(), LogStr(), _collect(),
- Is called by: DoSetUpApp(), CenterofRectClick(), AboutBox(), CalcOffset(),
- PageSetup(), Printer(), RandomTextSelection(), SaveAs(),
- OpenFile(), Polling(), SetUpDocumentWindow(), TestWindow(),
- WindowFunction(), DragAcrossScreens(), SizeAcrossScreens(),
- CoverCompletely(), SelectWindow(), UnCoverWindow(), DragWindow(),
- SizeWindow(), ZoomWindow(), CloseWindow(), CloseAllWindows(),
- GetRandomPointsRelativeToWindow(), DialogHandler(),
- DialogDismisser(), DismissDialog(), MoveRelativeToWindow(),
- DoWPTools()
-
-
- Task: GetRandomPointsRelativeToWindow(pInset := { 0,0,20,20}, pSpecifier := 0,
- pNumPts := 1)
- Library: UserInterface.lib
- Header:
- ########################################################################
- # GetRandomPointsRelativeToWindow(pInset, pSpecifier, pNumPts)
- #=======================================================================
- # Author: KTA
- # Description: Determines what the rectangle is for the window specified
- # as Specifier and returns a random X and Y coordinate which
- # will be inside the window if moving relative to the top
- # left corner of the screen or window.
- # Parameters: pInset - ltrb inset from screen or window
- # pSpecifier
- # Integer
- # > 0 - Ordinality window to find coords in
- # = O coords in window with s:doc g:true and c:true
- # < 0 coords in specified screen. Screen numbers
- # are negative of pSpecifier.
- # String
- # title of window to find coords in
- # {List}
- # any partial or complete window descriptor
- # Returns: myPoints - List of random X and Y. eg. { x, y }
- #========================================================================
- Calls: FindWindow(), GetXYRandom()
- Is called by: MakePointList()
-
-
- Task: SelectButton(pButton)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # SelectButton(pButton)
- #========================================================================
- # Author: KTA
- # Description: This routine will select the button named <pButtonName>
- # Parameters: pButton - string - holding name of button to select
- # integer - ordinality of Button
- # Returns: 0 - Couldn't select button
- # pButtonName - Selected button OK
- #========================================================================
- Calls: _match(), logStr(), _move(), gPreSelectButtonHook, _click(),
- Is called by: ShimmerMateCopy(), MiniLaunch(), QuitBackgroundApps(),
- AboutBox(), TestPageSetup(), PrintSample(), SFType(),
- ReplaceExist(), Revert(), CancelStandardFile(),
- CheckYesNo(), DialogCheck(), DialogDismisser(),
- DismissDialog()
-
-
- Task: SelectRadioButton(pRadioButton)
- Library: UserInterface.lib
- Header:
- #######################################################################
- # SelectRadioButton(pRadioButton)
- #========================================================================
- # Author: KTA
- # Description: This routine will select RadioButton named <pRadioButtonName>
- # Parameters: pRadioButton - string - name of radio button to select
- # integer - radio button ordinality
- # Returns: 0 - Couldn't select radio button
- # pRadioButtonName - Selected button OK
- #========================================================================
- Calls: _match(), _Select(), LogStr()
- Is called by: ShimmerMateCopy(), MiniLaunch(), PaperSize(), PageSize()
-
-
- Task: SelectCheckBox(pCheckBox)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # SelectCheckBox(pCheckBox)
- #========================================================================
- # Author: KTA
- # Description: This routine will select CheckBox named <pCheckBoxName>
- # Paramters: pCheckBox - string - name of check box to select
- # integer - ordinality of checkBox
- # Returns: 0 - Couldn't select check box
- # pCheckBoxName - Selected check box OK
- #========================================================================
- Calls: _match(), _Select(), LogStr()
- Is called by: TestCheckBoxList()
-
-
- Task: CheckYesNo(pFlag := true)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # CheckYesNo(pFlag)
- #========================================================================
- # Author: SL
- # Description: Checks for dialog boxes with "Yes" (or "OK") and "No"
- # buttons. If they are found, clicks one of the buttons
- # depending on the 'pFlag' parameter.
- # Parameters: pFlag - TRUE - Selects "Yes" or "OK" button.
- # FALSE - Selects "No" button.
- # DocName - Name that docment will be saved with.
- # Returns: What is returned by SelectButton
- #========================================================================
- Calls: _matchBoolean(), SelectButton(), _match()
- Is called by: Quit(), CloseWindow()
-
-
- Task: DialogCheck(pFindStaticText :='', pCommitButton :="", pLogIT := 1,
- pWindowDesc := [window o:1 c:false])
- Library: UserInterface.lib
- Header:
- ########################################################################
- # DialogCheck(pFindStaticText,pCommitButton, pLogIT, pWindowDesc)
- #=======================================================================
- # Author: KTA
- # Description: This routine will to match a dialog of specified by <pWindowDesc>,
- # with static text - <pFindStaticText>, if found it will select the
- # Button - {pCommitButton}. If <pFindStaticText> is not defined a
- # match will be made on any dialog with static text.
- # Parameters: pFindStaticText - Static text string that you want to match
- # pCommitButton - Button to select if the static text is found.
- # pLogIT - If you don't want to log the dialog pass 0
- # pWindowDesc - window descriptor of dialog
- # Returns: <Static Text> - the Static Text String found pFindStaticText
- # and selected pCommitButton
- # 0 - Couldn't find pFindStaticText
- #=======================================================================
- Calls: _matchBoolean(), _collect(), IsSubString(), LogStr(), SelectButton(),
- SpecialKey(),
- Is called by: DrawObject(), ReportSelectedMenuItems(), MiniLaunch(),
- LaunchAssist(), LaunchTwitch(), SaveAs(), OpenFile(),
- Revert(), TimeCutPaste(), SelectMenuItem(),
-
-
- Task: DialogHandler(pSpecifier := [window o:1 s:movablemodal c:false]!)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # DialogHandler(pSpecifier)
- #========================================================================
- # Author: KTA
- # Description: Keep calling DialogDimisser() while there is a dialog present.
- # Parameters: pSpecifier - dialog descriptor.
- # Returns: 0 - Unsuccessful
- # -1 - There were no dialogs to dismiss
- # returnVal >= 1 - Successful All dialog were dismissed. Indicates
- # the number of dialogs that were idsmissed.
- # Examples: DialogHandler();
- # Assumptions: None
- #========================================================================
- Calls: findwindow(), ExceptionDispatcher(),
- Is called by: Quit(), TCSEnd()
-
-
- Task: DialogDismisser( pHowToDismiss := 'All', pSpecifier := [window o:1 c:false]!,
- pSpecifiedDialog := false)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # DialogDismisser(pHowToDismiss, pSpecifier)
- #========================================================================
- # Author: KTA
- # Description: Dismiss dialogs using one of several methods (or all)
- # Parameters: pHowToDismiss
- # 1 - Command - '.'
- # 2 - Escape key
- # 3 - 'Cancel' Button
- # 4 - 'No' button
- # 5 - 'Don't Save' button
- # 6 - 'OK' button
- # 7 - 'Quit' button
- # 8 - type 'Return Key'
- # String -
- # 'All' - all methods above
- # Any other string - SelectButton(<string>).
- # pSpecifier - dialog descriptor.
- # Returns: 0 - Unsuccessful
- # (non-zero) - Successful All dialog were dismissed.
- # Examples: DialogDismisser();
- # Assumptions: None
- #========================================================================
- Calls: _MatchBoolean(), FindWindow(), KeyEq(), SpecialKey(), SelectButton(),
- _match(), DialogDismisser(), LogStr()
- Is called by: DialogHandler(), DialogDismisser
-
-
- Task: DismissDialog (pHowToDismiss := 1, pSpecifier := [window o:1 c:false]!)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # DismissDialog(pHowToDismiss, pSpecifier)
- #=======================================================================
- # Author: ML
- # Description: Generic dialog dismisser.
- # Assumptions: Window is style dialog and ordinality 1.
- # Parameters: pHowToDismiss - 1 type return key
- # {string} select button named {string}
- # Returns: 0 - dialog not dismissed
- # 1 - dialog sucessfully dismissed
- # Example: DismissDialog ('Cancel')
- #=======================================================================
- Calls: FindWindow(), SpecialKey(), keyEq(), selectbutton(), _matchBoolean(),
- logstr(),
- Is called by: DoSetUpApp()
-
-
- Task: MoveRelativeToWindow(pHorizontalPixels:= 'random', pVerticalPixels:= 'random',
- pSpecifier:=0,pMouseDown:=0,pInset:= {30,30,30,30}, WhichCorner := 1)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # MoveRelativeToWindow(pHorizontalPixels, pVerticalPixels, pSpecifier,pMouseDown,pInset)
- #========================================================================
- # Author: NJV
- # Description: This routine will calculate the window's rectangle
- # and add pHorizontalPixels and pVerticalPixels input parameters
- # to the rectangle's top-left coordinate point. It will then
- # move the mouse to that location. The window is
- # specified by the pSpecifier input parameter. If the
- # pSpecifier parameter is not present, the default
- # behavior will move relative to the frontmost document window.
- # Parameters: pHorizontalPixels - int representing left (pHorizontalPixels) coord
- # or List of points.
- # pVerticalPixels - int representing top (pVerticalPixels) coord
- # pSpecifier - holds title or ordinality of window
- # 0 matches first s:document c:true g:true window
- # pMouseDown - (see MoveMouse())
- # pInset - inset from window rect for GetXYRandom
- # WhichCorner - Relative to which corner of the window
- # 1 - Top/Left
- # 2 - Bottom/Left
- # Returns: Nothing
- # Examples: MoveRelativeToWindow(12,25);
- # Assumptions: Assumes there is a window on the screen
- #========================================================================
- Calls: GetRandomPointsRelativeToWindow(), FindWindow(), MoveMouse()
- Is called by: UseClickTool(), UseDragTool(), UseDragClickTool(), UseMultiDragTool(),
- UseMultiClickTool(), UseMultiClickDragTool(), UseDragOffTool(),
- NextLine(), SelFromDocWind(), SelFromCoord(), SelFromPopUp(),
- SelFromMenuItemPopUp(), PageSize(), ToggleOrientation(),
- PointSelect(), RectSelect(), HereToStartSelect(), HereToEndSelect(),
- SelectAll(), RandomTextSelection()
-
-
- Task: MoveMouse(pHorizontalPixels := 'random', pVerticalPixels := 'random',
- pAbsolutely := 1, pMouseDown := 0)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # MoveMouse(pHorizontalPixels, pVerticalPixels, pAbsolutely, pMouseDown)
- #========================================================================
- # Author: DMM
- # Description: This routine will move the mouse pHorizontalPixels,pVerticalPixels
- # relative to its current location If pHorizontalPixels and
- # pVerticalPixels are absent or equal to "random", a random move is generated.
- # Parameters: pAbsolutely - 1 if move pAbsolutely, 0 if relative
- # pHorizontalPixels - horizontal distance in pixels to move mouse
- # pVerticalPixels - vertical distance in pixels to move mouse
- # if pHorizontalPixels and pVerticalPixels are absent
- # or := "random" then a random move is generated.
- # pAbsolutely - 1 to move to absolute location
- # 0 to move relative to current location
- # pMouseDown - 0 - don't hold mouse key down while moving
- # 1 - press mouse key down - move - release (can be a list of 1 element)
- # 2 - Click after moving - no mouse down during move
- # 3 - press mouse key down - move - don't release
- #pHorizontalPixels is List 3 - MultiDrag (pressmouse-move-move-move-releaseMouse)
- # 4 - move - release
- #pHorizontalPixels is List 5 - MultiClick (move-click-move-click)
- #pHorizontalPixels is List 6 - move-pressmouse-move-move-move-releaseMouse
- # Returns: Nothing
- #========================================================================
- Calls: getXYRandom(), _PressMouse(), gPreMoveMouseHook, _move(), _click(),
- _releaseMouse(), LogStr()
- Is called by: SelFromDocWind(), SelFromPalWind(), SelFromCoord(),
- SelFromPopUp(), SelFromMenuItemPopUp(), PointSelect(),
- RectSelect(), SFSelectPopupMenuItem(), MoveRelativeToWindow()
-
-
- Task: TypeStr(pTheString :='')
- Library: UserInterface.lib
- Header:
- #########################################################################
- # TypeStr(pTheString)
- #========================================================================
- # Author: KTA
- # Description: This routine will type the string that is passed in as
- # the <pTheStringing>.
- # Parameters: pTheString - The string to be typed
- # Returns: Nothing
- # Note: If gTypeStrOverRide is defined as a task reference, it will have to handle
- # all actions all of the functionality of TypeStr since it is being overriden.
- #========================================================================
- Calls: gTypeStrOverRide, _type(), LogStr()
- Is called by: DoText(), DrawObject(), FinderNavigate(),
- ReportSelectedMenuItems(), MiniLaunch(), LaunchByTypeSelect(),
- PageSize(), SaveAs(), OpenFile(), ReplaceExist(),
- ModifyDocument()
-
-
- Task: TypeList(pStringList,pSpecialKey := 0, pTypeFinalKey := 0)
- Library: UserInterface.lib
- Header:
- #########################################################################
- # TypeList(pStringList,pSpecialKey, pTypeFinalKey)
- #========================================================================
- # Author: KTA
- # Description: This routine will type each item in the {pStringList}
- # and the selected special key, designated by the <pSpecialKey>
- # input parameter, after each item. If pTypeFinalKey = 0 the
- # special key will be suppressed after the last item.
- # Parameters: pStringList - list holding strings to type
- # pSpecialKey - integer representing key to type after the item has
- # been typed.
- # pSpecialKey := 0 Nothing
- # pSpecialKey := 1 (ReturnKey)
- # pSpecialKey := 2 (TabKey)
- # pSpecialKey := 3 (EnterKey)
- # pSpecialKey := 4 (UpArrowKey)
- # pTypeFinalKey - 1 to type special key after last item in <pStringList>
- # 0 to disable typing of last special key
- # Return Value: None
- # Examples: TypeList({'A','list', 'of items'},2); To type each item
- # and then the tabKey
- # Assumptions: None
- #========================================================================
- Calls: _Type(), LogStr()
- Is called by: ShimmerMateCopy(), SFType()
-
-
- Task: SpecialKey( pTheKey, pKeyName := "", pNumTimes := 1 )
- Library: UserInterface.lib
- Header:
- #########################################################################
- # SpecialKey( pTheKey, pKeyName, pNumTimes )
- #========================================================================
- # Author: KTA
- # Description: This routine will type whatever SpecialKey is entered
- # However it will only log the name of the special character
- # if the special key name is also passed in as a String in
- # the pKeyName parameter.
- # Parameters: pTheKey - the VU key-word for the special key to be typed
- # (i.e. ReturnKey, TabKey, EnterKey, etc.)
- # pKeyName - the string name of the special key
- # pNumTimes - number of times to type the special key (default = 1)
- # Returns: Nothing
- # Examples: SpecialKey(TabKey,"TabKey");
- #========================================================================
- Calls: LogStr(), gPreSpecialKeyHook, _type()
- Is called by: ShimmerMateCopy(), NextLine(), MiniLaunch(),
- QuitBackgroundApps(), AboutBox(), PrintSample(), PageSetup(),
- Printer(), SaveAs(), OpenFile(), ReplaceExist(), Revert(),
- CancelStandardFile(), DialogCheck(), DialogDismisser(),
- DismissDialog()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: Utility.lib
- Calls:
-
-
- Task: Timer(timeParam:=1)
- Library: Utility.lib
- Header:
- #########################################################################
- # Timer(timeParam)
- #=======================================================================
- # Author: DM
- # Description: Calculates the time between two time descriptors
- # Parameters: timeParam - Specifier - what to return
- # 1 - return (theTime) - full descriptor
- # 2 - return ({"{theHour}:{theSec}",theHour,theSec});
- # 3 - return (("{theMonth}/{theDay}/{theYear}"))
- # 4 - CurrentTime - formatted
- # Example: Timer(1);
- #=======================================================================
- Calls:
- Is called by: StartTimerVU(), StopTimerVU(), BeginTimer(), EndTimer()
-
-
- Task: ETime(time1, time2, mode := 1)
- Library: Utility.lib
- Header:
- #########################################################################
- # ETime(time1, time2, mode)
- #=======================================================================
- # Author: DM
- # Description: Calculates the time between two time descriptors
- # Parameters: time1, time2 - times to compare
- # Returns: mode := 0 Difference between the two in secs
- # Returns: mode := 1 Difference between the two "{eh}:{em}:{es}"
- # Example: ETime(time1, time2);
- #=======================================================================
- Calls:
- Is called by: StopTimerVU(), EndTimer()
-
-
- Task: BeginTimer()
- Library: Utility.lib
- Header:
- #########################################################################
- # BeginTimer()
- #=======================================================================
- # Author: ML
- # Description: Starts the timer
- # Parameters: none
- # Returns: None
- #=======================================================================
- Calls:
- Is called by: SuiteStart()
-
-
- Task: EndTimer()
- Library: Utility.lib
- Header:
- #########################################################################
- # EndTimer()
- #=======================================================================
- # Author: ML
- # Description: Ends the timer
- # Parameters: none
- # Returns: None
- #=======================================================================
- Calls: ETime()
- Is called by: SuiteEnd()
-
-
- Task: GetCurrentTime(NeedMeridian := true, returnDate := true)
- Library: Utility.lib
- Header:
- #########################################################################
- # GetCurrentTime(NeedMeridian, returnDate)
- #=======================================================================
- # Author: Derived from VU Example Libraries
- # Description: This task returns the current time. The format is as follows:
- # <hour of day>:<minutes>:<seconds> <AM or PM>
- # It also takes one parameter that indicates whether the
- # date should be printed. If the actual parameter passed
- # is a true value, the current date is also printed.
- # If no parameter is passed, the date is printed by default.
- # The format of the date is as follows:
- # <month>/<day>/<year>
- # Parameters: NeedMeridian - Adds AM/PM if true
- # returnDate - Adds date if true
- # Returns: Current Time (& Date) string
- #=======================================================================
- Calls:
- Is called by: SuiteEnd(), BuildSuiteFields()
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: WordProcessor.lib
- Calls: Libraries "DoTasks.Lib","UserInterface.Lib", "ExceptionHandling.Lib";
-
-
-
- Task: DoWPTools()
- Library: WordProcessor.lib
- Header:
- #########################################################################
- # DoWPTools()
- #========================================================================
- # Author: ML
- # Description: Test Word Processor Tools.
- # Parameters: RulerRect,TabToolList,OtherToolList,SelectAllFlag
- # Returns: Nada
- # Examples: DoWPTools();
- # Assumptions: Word
- #========================================================================
- Calls: _matchBoolean(), selectmenuitem(), FindWindow(), DoDraw(),
- Is called by:
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- ##############################################################
- Library: WorldReady.lib
- Calls: "Output.Lib", "UserInterface.Lib", "ExceptionHandling.Lib";
-
-
-
- Task: InitINTLGlobals(pAppLanguage := '', pScriptSystem := {},
- pDefinedAppLanguages := {})
- Library: WorldReady.lib
- Header:
- #########################################################################
- # InitINTLGlobals()
- #========================================================================
- # Author: KTA
- # Description: Redefines several global varibles based on resources that are set
- # up for specific language systems.
- # Parameters: None
- # Returns: Nothing
- # Example: InitINTLGlobals();
- #========================================================================
- Calls: WhichLanguageResources(), WhatResourceBase(), GetIndString(),
- IntlStandardFileHooks(), BuildListFromResourceINTL(),
- Is called by:
-
-
- Task: WhichLanguageResources(pAppLanguage := '', pScriptSystem := {},
- pDefinedAppLanguages := {})
- Library: WorldReady.lib
- Header:
- #########################################################################
- # WhichLanguageResources( pAppLanguage, pScriptSystem, pDefinedAppLanguages )
- #========================================================================
- # Author: KTA
- # Description: Sets up globals required to swap resources for different language systems.
- # Parameters: pAppLanguage := Language of the application to be tested (should be
- # language identifier see below)
- # pScriptSystem := List of 2 elements
- # 1st element - Language of the script system (language identifier)
- # 2nd element - Boolean indicating whether script system is
- # localized or not.
- # 3rd element - Language Identifier for the language for the
- # gFontList and gTextStr. This is an optional paramter,
- # if it does not exist these will default to the language
- # of the primary script system
- # pDefinedAppLanguages - list of defined languages for the script
- # Returns: nothing - but it sets up several globals
- # Example: WhichLanguageResources('AB',{'AB',0} );
- # Notes: Language Identifier
- # US - US
- # JP - Japanese
- # SC - Simplified Chinese
- # TC - Traditional Chinese
- # KH - Korean
- # AB - Arabic
- # HB - Hebrew
- # TH - Thai
- # Global gLanguageSettings is defined as follows:
- # {
- # Application Language - (e.g. 'US')
- # {
- # Primary Script Language (e.g. 'JP'),
- # Is Primary Script Localized (i.e. 0 - NO, 1 - Yes),
- # Language for Fonts and TextStr (e.g. 'JP')
- # }
- # }
- # For example:
- # gLanguageSettings := {'US',{'JP',0,'JP'}};
- #========================================================================
- Calls: PrimaryScript(), LogStr(), WhatResourceBase(), _matchBoolean()
- Is called by: InitINTLGlobals()
-
-
- Task: IntlStandardFileHooks()
- Library: WorldReady.lib
- Header:
- #########################################################################
- # IntlStandardFileHooks()
- #========================================================================
- # Author: KTA
- # Description: Set up defaults for always manipulating StandardFile in US then
- # switching back to original script
- # Parameters: None
- # Returns: nothing - but it defines several global hooks
- # Example: IntlStandardFileHooks();
- #
- #========================================================================
- Calls:
- Is called by: InitINTLGlobals()
-
-
- Task: MenuTitle(menuItemOrd, MenuOrd, Hmenu := 0)
- Library: WorldReady.lib
- Header:
- #########################################################################
- # MenuTitle( menuItemOrd, MenuOrd, Hmenu )
- #========================================================================
- # Author: KTA
- # Description: Returns the title of the menuitem specified by the parameters
- # in ordinality.
- # Parameters: menuItemOrd - (integer) ordinality of menuItem
- # MenuOrd - (integer) ordinality of menu (if its hierarchical
- # this is the second level menu).
- # Hmenu - (integer) ordinality of menu ( only defined if it
- # the menuitem is a hierarchical. This is the top most
- # menu.
- # Returns: {theMITitle,theMenuHTitle, theMenuTitle};
- # Example: MenuTitle(2,3,4);
- #========================================================================
- Calls: ExceptionDispatcher(),
- Is called by:
-
-
- Task: WhichScript(scriptTitle := '')
- Library: WorldReady.lib
- Header:
- #########################################################################
- # WhichScript( scriptTitle )
- #========================================================================
- # Author: KTA
- # Description: Returns the current and primary scripts installed
- # Parameters: scriptTitle := Requested script - Will select the script <ScriptTitle>
- # if it is installed
- # Returns: {currentScript,primaryScript} - if successful
- # 0 - if failure
- # Example: WhichScript('Arabic');
- #========================================================================
- Calls: _matchBoolean(), _collect(), _select(), ExceptionDispatcher()
- Is called by:
-
-
- Task: CurrentlySelectedScript()
- Library: WorldReady.lib
- Header:
- #########################################################################
- # CurrentlySelectedScript()
- #========================================================================
- # Author: KTA
- # Description: Returns the language identifier for the currently selected script
- # system (see below for language identifiers.)
- # Parameters: none
- # Returns: 0 - if failure
- # language identifier of selected script - if successful
- # RM - Roman
- # JP - Japanese
- # SC - Simplified Chinese
- # TC - Traditional Chinese
- # KH - Korean
- # AB - Arabic
- # HB - Hebrew
- # TH - Thai
- # Example: CurrentlySelectedScript();
- #========================================================================
- Calls: ExceptionDispatcher(),
- Is called by: SwitchScript(), SwitchScriptToUS(), SwitchScriptBackToOrig(),
- HandleDoubleByteStrings()
-
-
- Task: PrimaryScript()
- Library: WorldReady.lib
- Header:
- #########################################################################
- # PrimaryScript()
- #========================================================================
- # Author: KTA
- # Description: Returns the language identifier for the primary script
- # system (see below for language identifiers.)
- # Parameters: none
- # Returns: 0 - if failure
- # language identifier of selected script - if successful
- # RM - Roman
- # JP - Japanese
- # SC - Simplified Chinese
- # TC - Traditional Chinese
- # KH - Korean
- # AB - Arabic
- # HB - Hebrew
- # TH - Thai
- # Example: PrimaryScript();
- #========================================================================
- Calls: ExceptionDispatcher()
- Is called by: WhichLanguageResources(), HandleDoubleByteStrings()
-
-
- Task: WhichMenuIsKeyBoardMenu(pKeyBoardMenuString := 'About Keyboards…')
- Library: WorldReady.lib
- Header:
- #########################################################################
- # WhichMenuIsKeyBoardMenu(pKeyBoardMenuString)
- #========================================================================
- # Author: KTA
- # Description: Returns the ordinality of the KeyBoard menu.
- # Parameters: pKeyBoardMenuString := String 'About KeyBoards'
- # ( This could be different if system is localized)
- # Returns: ordinality of the KeyBoard menu - if successful
- # 0 - if failure
- # Example: WhichMenuIsKeyBoardMenu('About Keyboards…');
- #========================================================================
- Calls: _matchBoolean(), ExceptionDispatcher(),
- Is called by: IsScriptInstalled(), SwitchScript()
-
-
- Task: StringsToSelectScript(pLanguageCode := '')
- Library: WorldReady.lib
- Header:
- #########################################################################
- # StringsToSelectScript( pLanguageCode )
- #========================================================================
- # Author: KTA
- # Description: Returns the a list which contains all of the strings for
- # the script so you can select it from the keyBoards menu.
- # Parameters: pLanguageCode := Two letter language identifier (see below)
- # US - U.S.
- # JP - Japanese
- # SC - Simplified Chinese
- # TC - Traditional Chinese
- # KH - Korean
- # AB - Arabic
- # HB - Hebrew
- # TH - Thai
- # Returns: 0 - if failure
- # List containing strings that are actually in the Keyboard menu
- # for that language. - if successful#
- # Example: StringsToSelectScript('AB');
- #========================================================================
- Calls:
- Is called by: IsScriptInstalled(), SwitchScript()
-
-
- Task: IsScriptInstalled(pTheScript:= '')
- Library: WorldReady.lib
- Header:
- #########################################################################
- # IsScriptInstalled( pTheScript )
- #========================================================================
- # Author: KTA
- # Description: Returns a boolean which indicates whether the input parameter
- # <pTheScript> is installed.
- # Parameters: pTheScript - language identifier for script
- # US - U.S.
- # JP - Japanese
- # SC - Simplified Chinese
- # TC - Traditional Chinese
- # KH - Korean
- # AB - Arabic
- # HB - Hebrew
- # TH - Thai
- # Returns: 1 - if script is installed
- # 0 - if script is not installed
- # Example: IsScriptInstalled('US');
- #========================================================================
- Calls: StringsToSelectScript(), WhichMenuIsKeyBoardMenu(), _matchBoolean()
- Is called by: SwitchScript()
-
-
- Task: BuildListFromResourceINTL(idNum)
- Library: WorldReady.lib
- Header:
- #########################################################################
- # BuildListFromResourceINTL( idNum )
- #========================================================================
- # Author: KTA
- # Description: Returns a list generated from all of the strings in a specified
- # string list resource specified by <idNum>.
- # Parameters: idNum := resource id number for the string list resource.
- # Returns: list - all strings in specified string list resource.
- # Examples: BuildListFromResource( 1000 );
- # Assumptions: This task must be contained within the same file that contains
- # the resources. Currently this task only supports up to 100 strings
- # in a single str# resource.
- # Note: A duplicate of this task exists in 'Globals.Lib'. The reason
- # for this is that Vu has a limitation in the way it handles
- # resources in that it requires that a full path to the file be
- # provided or the resources exist in the current file. Since we
- # do not have access to a fullpath, and do not want to require
- # all users to name their hard drives and folders the same, we
- # opted to place a duplicate copy of this task in all files that
- # want to use it. The naming convesion is to append the name
- # of the application under test to the end of the task name.
- # For example, BuildListFromResourceMacDraw()
- #========================================================================
- Calls: GetIndString()
- Is called by: InitINTLGlobals()
-
-
- Task: SwitchScript(pWhichScript := '')
- Library: WorldReady.lib
- Header:
- #########################################################################
- # SwitchScript( pTheScript )
- #========================================================================
- # Author: KTA
- # Description: Selects the specified script from the KeyBoard Menu
- # Parameters: pTheScript - language identifier for script
- # US - U.S.
- # JP - Japanese
- # SC - Simplified Chinese
- # TC - Traditional Chinese
- # KH - Korean
- # AB - Arabic
- # HB - Hebrew
- # TH - Thai
- # Returns: 1 - if script is switched to
- # 0 - if script is not switched to
- # Example: SwitchScript('US');
- #========================================================================
- Calls: IsScriptInstalled(), StringsToSelectScript(), WhichMenuIsKeyBoardMenu(),
- _match(), ExceptionDispatcher(), _select(), LogStr(),
- CurrentlySelectedScript(), _PressKey(), _Type(), _releaseKey(),
- KeyEq(),
- Is called by: SwitchScriptToUS(), SwitchScriptBackToOrig(),
- HandleDoubleByteStrings()
-
-
- Task: SwitchScriptToUS()
- Library: WorldReady.lib
- Header:
- #########################################################################
- # SwitchScriptToUS()
- #========================================================================
- # Author: KTA
- # Description: Selects the US script from the KeyBoard Menu
- # Parameters: None
- # Returns: what SwitchScript returns
- # Example: SwitchScriptToUS();
- #========================================================================
- Calls: CurrentlySelectedScript(), SwitchScript()
- Is called by: TimeSaveAs(), TimeOpenFile(), TypeEnglishText()
-
-
- Task: SwitchScriptBackToOrig()
- Library: WorldReady.lib
- Header:
- #########################################################################
- # SwitchScriptBackToOrig()
- #========================================================================
- # Author: KTA
- # Description: Selects the script specified by the global <gtheCurrentScript>
- # from the KeyBoard Menu
- # Parameters: None
- # Returns: what SwitchScript returns
- # Example: SwitchScriptBackToOrig();
- #========================================================================
- Calls: CurrentlySelectedScript(), SwitchScript()
- Is called by: TimeSaveAs(), TimeOpenFile(), TypeEnglishText()
-
-
- Task: WhatResourceBase(pLanguageIdentifier := '')
- Library: WorldReady.lib
- Header:
- #########################################################################
- # WhatResourceBase(pLanguageIdentifier)
- #========================================================================
- # Author: KTA
- # Description: Returns a Resource base number for a given language identifier
- # Parameters: pLanguageIdentifier :=
- # US - US
- # JP - Japanese
- # SC - Simplified Chinese
- # TC - Traditional Chinese
- # KH - Korean
- # AB - Arabic
- # HB - Hebrew
- # TH - Thai
- #
- # Returns: Integer which is the base resource for that particular language
- # Example: mybaseRes := WhatResourceBase('AB');
- #
- #========================================================================
- Calls:
- Is called by: InitINTLGlobals(), WhichLanguageResources(), TypeEnglishText()
-
-
- Task: TypeEnglishText()
- Library: WorldReady.lib
- Header:
- #########################################################################
- # TypeEnglishText()
- #========================================================================
- # Author: KTA
- # Description: Switches to the U.S. script system, type a line of english text
- # and switches back to the original script.
- # Parameters: none
- # Returns: nothing
- # Example: TypeEnglishText();
- #
- #========================================================================
- Calls: SwitchScriptToUS(), WhatResourceBase(), GetIndString(), _type(),
- SwitchScriptBackToOrig()
- Is called by:
-
-
- Task: GenerateStandardFontRecord()
- Library: WorldReady.lib
- Header:
- #########################################################################
- # GenerateStandardFontRecord()
- #========================================================================
- # Author: KTA
- # Description: Generates a font record based on the first element of gFontList,
- # the first element of gFontSizeList and the first two elements of
- # gFontStyleList.
- # Parameters: none
- # Returns: theFontRecord - the font record that is generated
- # Example: myfontRecord := GenerateStandardFontRecord();
- #
- #========================================================================
- Calls:
- Is called by:
-
-
- Task: HandleDoubleByteStrings()
- Library: WorldReady.lib
- Header:
- #########################################################################
- # HandleDoubleByteStrings()
- #========================================================================
- # Author: KTA
- # Description: Defines an override task for typeStr if the current script system
- # uses double byte characters. The side effect of this task is
- # that the global gTypeStrOverRide will be defined and all calls to TypeStr()
- # will be redirected to call the task that has been defined for a specific
- # script system. To remove the effects of this call it is possible to '
- # redefine gTypeStrOverRide as follows:
- # global gTypeStrOverRide := 0;
- # Parameters: none
- # Returns: currScript - language identifier of the currently selected script
- # Example: HandleDoubleByteStrings();
- #========================================================================
- Calls: CurrentlySelectedScript(), PrimaryScript(), SwitchScript(), TypeJapaneseString,
- TypeSimplifiedChineseString, TypeTradChineseString
- Is called by:
-
-
- Task: TypeJapaneseString(pdumpedStr := '',
- pJapaneseString := 'jikangaarebategamiwokudasarebaiitoomoimasu. ')
- Library: WorldReady.lib
- Header:
- #########################################################################
- # TypeJapaneseString()
- #========================================================================
- # Author: KTA
- # Description: Types a predefined string that will generate a Japanese string when
- # typed into the bottom line input window.
- # Parameters: pdumpedStr - When overriding TypeStr() the string that was
- # to be typed is passed to the Overriding task. It
- # is ignored in this task.
- # pJapaneseString - a string of characters that will produce a japanese
- # string when typed into the bottom line input window.
- # Returns: nothing
- # Example: TypeJapaneseString();
- #========================================================================
- Calls: _type(), LogStr()
- Is called by:
-
-
- Task: TypeSimplifiedChineseString(pdumpedStr := '',
- pSChineseString := {'wo1','men1','dou2','sh1','ping4','guo3',
- 'dian1','nao2','gong2','si8','de1','hao1','peng1','you6'})
- Library: WorldReady.lib
- Header:
- #########################################################################
- # TypeSimplifiedChineseString()
- #========================================================================
- # Author: KTA
- # Description: First option-shift-'c' will be typed to set the input method to Pinyin
- # Then, types a predefined string that will generate a SChinese string when
- # typed into the bottom line input window.
- # Parameters: pdumpedStr - When overriding TypeStr() the string that was
- # to be typed is passed to the Overriding task. It
- # is ignored in this task.
- # pSChineseString - a string of characters that will produce a SChinese
- # string when typed into the bottom line input window.
- # Returns: nothing
- # Example: TypeSimplifiedChineseString();
- #========================================================================
- Calls: _presskey(), _type(), _releaseKey(), LogStr()
- Is called by:
-
-
- Task: TypeTradChineseString(pdumpedStr := '',
- pTradChineseSting := {'wo 1','men 1','shi 1','zhong 1','guo 1',
- 'ren 1','ta 1','men 1','shi 1','ben 1','di 1','ren 1'})
- Library: WorldReady.lib
- Header:
- #########################################################################
- # TypeTradChineseString()
- #========================================================================
- # Author: KTA
- # Description: First the menuitem for Traditional Chises will be selected.
- # Then, option-shift-'c' will be typed to set the input method to Pinyin
- # Finally, Types a predefined string that will generate a TChinese string when
- # typed into the bottom line input window.
- # Parameters: pdumpedStr - When overriding TypeStr() the string that was
- # to be typed is passed to the Overriding task. It
- # is ignored in this task.
- # pTradChineseSting - a string of characters that will produce a TChinese
- # string when typed into the bottom line input window.
- # Returns: nothing
- # Example: TypeTradChineseString();
- #========================================================================
- Calls: SelectMenuItem(), _presskey(), _type(), _releaseKey(), LogStr()
- Is called by:
-
-
- Task: RemoveTypeStrOverRide()
- Library: WorldReady.lib
- Header:
- #########################################################################
- # RemoveTypeStrOverRide()
- #========================================================================
- # Author: KTA
- # Description: Removes whatever task reference that has been defined for gTypeStrOverRide
- # Parameters: none
- # Returns: nothing
- # Example: RemoveTypeStrOverRide();
- #========================================================================
- Calls:
- Is called by:
-
-
- Task: BuildListFromResource(idNum, pFileName := "")
- Library: WorldReady.lib
- Header:
- #########################################################################
- # BuildListFromResource(idNum, pFileName := "")
- #========================================================================
- # Author: KTA
- # Description: Returns a list generated from all of the strings in a specified
- # string list resource specified by <idNum> from the file specified
- # by pFileName.
- # Parameters: idNum := resource id number for the string list resource.
- # pFileName - full path name of file where string resource is located.
- # Returns: list - all strings in specified string list resource.
- # Examples: BuildListFromResource( 1000, FileOfTask() );
- # Note: If string resource is located in script which you're calling
- # this task from, use FileOfTask() to pass in full path
- # filename as per the above example.
- #========================================================================
- Calls: GetIndString(),
- Is called by:
-
-
-
-
-
-
-
-
-
- ##############################################################
- ##############################################################
- SPEC Libraries Cross Reference.
- End...
- ##############################################################
- ##############################################################
-
-
-
-
-
-
-
- Task:
- Library:
- Header:
- ##############################################################
- ##############################################################
- Calls:
- Is called by:
-
-
- Task:
- Library:
- Header:
- ##############################################################
- ##############################################################
- Calls:
- Is called by:
-
-
- Task:
- Library:
- Header:
- ##############################################################
- ##############################################################
- Calls:
- Is called by:
-
-
- Task:
- Library:
- Header:
- ##############################################################
- ##############################################################
- Calls:
- Is called by:
-
-
- Task:
- Library:
- Header:
- ##############################################################
- ##############################################################
- Calls:
- Is called by:
-
-
- Task:
- Library:
- Header:
- ##############################################################
- ##############################################################
- Calls:
- Is called by:
-
-
-